aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-01-06 02:11:28 +0100
committerSantos Gallegos <stsewd@protonmail.com>2021-01-06 09:12:32 -0500
commit40588da97ca5de8db025f96abb4c1efb03f590e9 (patch)
treebf0da92bda5c2e6e1aeca3db5eeba2d652c1326e /CONTRIBUTING.md
parenthtml highlights: add "<!" to tag.delimiters (diff)
downloadnvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar.gz
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar.bz2
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar.lz
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar.xz
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.tar.zst
nvim-treesitter-40588da97ca5de8db025f96abb4c1efb03f590e9.zip
Remove usages of `@embedded` in highlights
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 08d4237e5..e92ffc3b7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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.
```
-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
```
@@ -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`
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
+```