aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/news.txt6
-rw-r--r--runtime/doc/treesitter.txt3
2 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 5c234677ef..b438595b5f 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -151,6 +151,12 @@ The following new APIs or features were added.
• |:highlight| now supports an additional attribute "altfont".
+• Treesitter captures can now be transformed by directives. This will allow
+ more complicated dynamic language injections.
+
+• |vim.treesitter.query.get_node_text()| now accepts a `metadata` option for
+ writing custom directives using |vim.treesitter.query.add_directive()|.
+
==============================================================================
CHANGED FEATURES *news-changes*
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 7bc9f3f9a7..693804497d 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -746,6 +746,9 @@ get_node_text({node}, {source}, {opts})
• {opts} (table|nil) Optional parameters.
• concat: (boolean) Concatenate result in a string (default
true)
+ • metadata (table) Metadata of a specific capture. This
+ would be set to `metadata[capture_id]` when using
+ |vim.treesitter.query.add_directive()|.
Return: ~
(string[]|string|nil)