-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
update C queries and grammar #3789
Conversation
This can now be automatically appended.
@@ -61,6 +61,7 @@ These configuration keys are available: | |||
| `config` | Language Server configuration | | |||
| `grammar` | The tree-sitter grammar to use (defaults to the value of `name`) | | |||
| `formatter` | The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout | | |||
| `append-error-node` | Whether to append a `(ERROR) @error` capture to the language query. (defaults to `true`) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the option name, I think highlight-errors
or something similar would be more intuitive.
I'm also curious whether this should be
- language-specific vs editor-wide
- on/off by default
IMO the error highlighting is pretty noisy when you're typing out a block but I'm not sure how others feel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't seem to be a straightforward way to use the editor config. I could either pass it a parameter (requires changing a lot of calls), or find a way to reference the editor config within the highlighter config.
Edit: The latter wouldn't be possible because the editor config is defined in helix-view while this is in helix-core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah good point. Using language config is ok then I think 👍
Now that the C/C++ queries have been updated in #4079, this might be closable? The appending error node changes could be split off to a separate PR or this PR could pivot to focusing on that |
I should probably make a new PR instead if I do that. |
The updated queries were pulled from nvim-treesitter. I might make another PR to make it more accurate in the future.