-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore Files setting and --ignore-files
in .streerc
both have no effect
#192
Comments
--ignore-files
in .streerc
has no effect--ignore-files
in .streerc
both have no effect
Seems like it is a limitation of the Language Server directly. It seems to ignore all command-line arguments (including from |
Which version of the plugin and which version of syntax tree are you running? This was fixed in a recent version. |
Gem version 5.0.1, extension version 0.5.1, which are both latest I believe. Just to be sure: $ bundle info syntax_tree | head -n 1
* syntax_tree (5.0.1)
$ code --list-extensions --show-versions | grep ruby-syntax-tree
ruby-syntax-tree.vscode-syntax-tree@0.5.1 Just to clarify, the gem CLI correctly ignores based on my $ bundle exec stree check db/schema.rb
All files matched expected format. With the default extension settings however, opening I tried using the setting
But I still get the same result when saving the file. |
I'm experiencing this also, fwiw. v0.5.1 of the extension and 5.3.0 of the gem. This appears to be an issue with the syntax_tree library's lsp implementation. It only accepts print width as an option. |
This may be due to a limitation of the language server itself, but I cannot get the extension to ignore files.
Assume I want to ignore checking and formatting for the file
db/schema.rb
in my Rails project. With the following.streerc
file in the project root:I can successfully have the CLI and Rake tasks ignore the file. However, the extension will always format the file, which is annoying because I like to use Format On Save. The language server does seem to pick up my other settings in
.streerc
, however.Here's what I have tried. In each case I have restarted the language server. Also, it may be worth noting I am using a bundled
syntax_tree
.db/schema.rb
schema.rb
**/schema.rb
'**/schema.rb'
(quoted to avoid shell expansion)/Users/chase/dev/my_project/db/schema.rb
(Absolute path)I expect the extension to do nothing when asked to format an ignored file either directly with the Command Pallete or with Format On Save.
If I need to dive into the language server and extension code to debug this, I will, because currently it's a bit annoying. I plan to generate a "TODO" list of files that fail
stree check
and adding them to my.streerc
, so I can incrementally format my project.The text was updated successfully, but these errors were encountered: