@@ -42,7 +42,16 @@ These are the available keys and descriptions for the file.
45+For a language to have syntax-highlighting and indentation among
46+other things, you have to add queries. Add a directory for your
47+language with the path `runtime/queries/<name>/`. The tree-sitter
45−For a language to have syntax-highlighting and indentation among other things, you have to add queries. Add a directory for your language with the path `runtime/queries/<name>/`. The tree-sitter [website](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#queries) gives more info on how to write queries.
48+[website](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#queries)
49+gives more info on how to write queries.
51+> NOTE: When evaluating queries, the first matching query takes
52+precedence, which is different from other editors like neovim where
53+the last matching query supercedes the ones before it. See
54+[this issue][neovim-query-precedence] for an example.
47## Common Issues
56## Common Issues
@@ -58,3 +67,4 @@ For a language to have syntax-highlighting and indentation among other things, y
59[treesitter-language-injection]: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection
68[treesitter-language-injection]: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection
60[languages.toml]: https://github.com/helix-editor/helix/blob/master/languages.toml
69[languages.toml]: https://github.com/helix-editor/helix/blob/master/languages.toml
70+[neovim-query-precedence]: https://github.com/helix-editor/helix/pull/1170#issuecomment-997294090