mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
doc: better clarification of highlights/injections
This commit is contained in:
parent
039fe9095d
commit
429e6f446b
1 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ For these types there is a _norm_ you will have to follow so that features work
|
|||
Here are some global advices:
|
||||
|
||||
- Examples of queries can be found in [runtime/queries/](runtime/queries/)
|
||||
- Note that (unlike tree-sitter) all matching patterns are applied, with the last one determining the visible highlight.
|
||||
- For highlights, all matching patterns are applied, with the last one determining the visible capture & highlight.
|
||||
- For injections, try your best to ensure that each captured node is only matched by a single pattern.
|
||||
- If the [parser is included in `nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter/SUPPORTED_LANGUAGES.md`) and installed with `:TSInstall`, you can use Neovim's developer tools (`:checkhealth`, `:InspectTree`, `:EditQuery`, `:Inspect`) to test your queries.
|
||||
|
||||
#### Inheriting languages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue