aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-07-22 15:29:32 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5 (patch)
tree2b2856c96ba738d90229a3d6eae44a7f66d7e5e2 /lua
parentrevert "fix(config)!: always install parsers bundled with nvim" (diff)
downloadnvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar.gz
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar.bz2
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar.lz
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar.xz
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.tar.zst
nvim-treesitter-5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5.zip
feat(locals)!: switch to upstream captures
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/locals.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua
index cc69d5621..ab0f89fc1 100644
--- a/lua/nvim-treesitter/locals.lua
+++ b/lua/nvim-treesitter/locals.lua
@@ -41,8 +41,8 @@ function M.get_definitions(bufnr)
local defs = {}
for _, loc in ipairs(locals) do
- if loc.definition then
- table.insert(defs, loc.definition)
+ if loc["local.definition"] then
+ table.insert(defs, loc["local.definition"])
end
end
@@ -55,8 +55,8 @@ function M.get_scopes(bufnr)
local scopes = {}
for _, loc in ipairs(locals) do
- if loc.scope and loc.scope.node then
- table.insert(scopes, loc.scope.node)
+ if loc["local.scope"] and loc["local.scope"].node then
+ table.insert(scopes, loc["local.scope"].node)
end
end
@@ -69,8 +69,8 @@ function M.get_references(bufnr)
local refs = {}
for _, loc in ipairs(locals) do
- if loc.reference and loc.reference.node then
- table.insert(refs, loc.reference.node)
+ if loc["local.reference"] and loc["local.reference"].node then
+ table.insert(refs, loc["local.reference"].node)
end
end