mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 01:10:02 -04:00
Remove usages of @embedded in highlights
This commit is contained in:
parent
091dff2ac6
commit
40588da97c
5 changed files with 17 additions and 17 deletions
|
|
@ -96,16 +96,6 @@ effect on highlighting. We will work on improving highlighting in the near futur
|
||||||
@punctuation.special for symbols with special meaning like `{}` in string interpolation.
|
@punctuation.special for symbols with special meaning like `{}` in string interpolation.
|
||||||
```
|
```
|
||||||
|
|
||||||
Some captures are related to language injection (like markdown code blocks). As this is not supported by neovim yet, these
|
|
||||||
are optional and will not have any effect for now.
|
|
||||||
|
|
||||||
```
|
|
||||||
@embedded
|
|
||||||
@injection
|
|
||||||
@injection.language
|
|
||||||
@injection.content
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Constants
|
#### Constants
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -245,3 +235,18 @@ You can define folds for a given language by adding a `folds.scm` query :
|
||||||
|
|
||||||
If the `fold.scm` query is not present, this will fallback to the `@scope` captures in the `locals`
|
If the `fold.scm` query is not present, this will fallback to the `@scope` captures in the `locals`
|
||||||
query.
|
query.
|
||||||
|
|
||||||
|
### Injections
|
||||||
|
|
||||||
|
Some captures are related to language injection (like markdown code blocks). They are used in `injections.scm`.
|
||||||
|
You can directly use the name of the language that you want to inject (e.g. `@html` to inject html).
|
||||||
|
|
||||||
|
If you want to dynamically detect the language (e.g. for Markdown blocks) use the `@language` to capture
|
||||||
|
the node describing the language and `@content` to describe the injection region.
|
||||||
|
|
||||||
|
```
|
||||||
|
@{language} ; e.g. @html to describe a html region
|
||||||
|
|
||||||
|
@language ; dynamic detection of the injection language (i.e. the text of the captured node describes the language)
|
||||||
|
@content ; region for the dynamically detected language
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,6 @@
|
||||||
(preproc_arg)
|
(preproc_arg)
|
||||||
(preproc_defined)
|
(preproc_defined)
|
||||||
] @function.macro
|
] @function.macro
|
||||||
; TODO (preproc_arg) @embedded
|
|
||||||
|
|
||||||
(((field_expression
|
(((field_expression
|
||||||
(field_identifier) @property)) @_parent
|
(field_identifier) @property)) @_parent
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
|
|
||||||
(template_substitution
|
(template_substitution
|
||||||
"${" @punctuation.special
|
"${" @punctuation.special
|
||||||
"}" @punctuation.special) @embedded
|
"}" @punctuation.special) @none
|
||||||
|
|
||||||
"..." @punctuation.special
|
"..." @punctuation.special
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
|
|
||||||
(interpolation
|
(interpolation
|
||||||
"{" @punctuation.special
|
"{" @punctuation.special
|
||||||
"}" @punctuation.special) @embedded
|
"}" @punctuation.special)
|
||||||
|
|
||||||
["," "." ":" (ellipsis)] @punctuation.delimiter
|
["," "." ":" (ellipsis)] @punctuation.delimiter
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,10 +153,6 @@
|
||||||
(false)
|
(false)
|
||||||
] @boolean
|
] @boolean
|
||||||
|
|
||||||
(interpolation
|
|
||||||
"#{" @punctuation.special
|
|
||||||
"}" @punctuation.special) @embedded
|
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue