From 4cda52a5d1918d14541e95cadcbc1181b43eafbb Mon Sep 17 00:00:00 2001 From: Yochem van Rosmalen Date: Mon, 1 Sep 2025 23:08:08 +0200 Subject: [PATCH] docs(treesitter): fix language-injection url #35592 --- runtime/doc/news-0.9.txt | 2 +- runtime/doc/treesitter.txt | 2 +- runtime/lua/vim/treesitter/languagetree.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt index d2fc64d860..0dbc60f1cb 100644 --- a/runtime/doc/news-0.9.txt +++ b/runtime/doc/news-0.9.txt @@ -186,7 +186,7 @@ The following new APIs or features were added. Additionally |TSNode:range()| now takes an optional {include_bytes} argument. • Treesitter injection queries now use the format described at - https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection . + https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#language-injection . Support for the previous format will be removed in a future release. • Added |nvim_get_hl()| for getting highlight group definitions in a format diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 853e4bc322..b37c284374 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -551,7 +551,7 @@ TREESITTER LANGUAGE INJECTIONS *treesitter-language-injections* < Note the following information is adapted from: - https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection +https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#language-injection Some source files contain code written in multiple different languages. Examples include: diff --git a/runtime/lua/vim/treesitter/languagetree.lua b/runtime/lua/vim/treesitter/languagetree.lua index 98347ac340..e76e399f41 100644 --- a/runtime/lua/vim/treesitter/languagetree.lua +++ b/runtime/lua/vim/treesitter/languagetree.lua @@ -988,7 +988,7 @@ end ---@private --- Extract injections according to: ---- https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection +--- https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#language-injection ---@param match table ---@param metadata vim.treesitter.query.TSMetadata ---@return string?, boolean, Range6[]