Skip to content
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

Closed
wants to merge 4 commits into from
Closed

update C queries and grammar #3789

wants to merge 4 commits into from

Conversation

kirawi
Copy link
Member

@kirawi kirawi commented Sep 11, 2022

The updated queries were pulled from nvim-treesitter. I might make another PR to make it more accurate in the future.

@@ -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`) |
Copy link
Member

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.

Copy link
Member Author

@kirawi kirawi Sep 30, 2022

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.

Copy link
Member

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 👍

@kirawi kirawi added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-tree-sitter Area: Tree-sitter labels Sep 13, 2022
@the-mikedavis
Copy link
Member

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

@kirawi
Copy link
Member Author

kirawi commented Feb 11, 2023

I should probably make a new PR instead if I do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tree-sitter Area: Tree-sitter S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants