aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-12-17 13:43:46 +0100
committerGitHub <noreply@github.com>2022-12-17 13:43:46 +0100
commit1c4794944deb734b24b4a424c50b766a96e050dd (patch)
treee1ccf4ccce199b19e1b98d2c6b2cc179a1fa25c1 /runtime/lua/vim/treesitter.lua
parentd65684f0c755a9341412423543b65ec872196440 (diff)
parentef91146efcece1b6d97152251e7137d301146189 (diff)
downloadrneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.gz
rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.bz2
rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.zip
Merge pull request #21393 from folke/highlight_show
feat(lsp): add function to get semantic tokens at cursor feat: `vim.inspect_pos()`, `vim.show_pos()` and `:Inspect[!]`
Diffstat (limited to 'runtime/lua/vim/treesitter.lua')
-rw-r--r--runtime/lua/vim/treesitter.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua
index 25f0e7dc5e..582922ecb6 100644
--- a/runtime/lua/vim/treesitter.lua
+++ b/runtime/lua/vim/treesitter.lua
@@ -240,7 +240,7 @@ function M.get_captures_at_pos(bufnr, row, col)
if M.is_in_node_range(node, row, col) then
local c = q._query.captures[capture] -- name of the capture in the query
if c ~= nil then
- table.insert(matches, { capture = c, metadata = metadata })
+ table.insert(matches, { capture = c, metadata = metadata, lang = tree:lang() })
end
end
end