diff options
| author | James Trew <j.trew10@gmail.com> | 2024-01-22 10:12:14 -0500 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-22 17:09:27 +0100 |
| commit | cd4e0909948eb33d3959e133c16f837e4db122c6 (patch) | |
| tree | d9cb05df45d300efe720583b88ce0ec9f3ce0cf0 /lua | |
| parent | Update parsers: phpdoc, templ, wing, zathurarc (diff) | |
| download | nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar.gz nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar.bz2 nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar.lz nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar.xz nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.tar.zst nvim-treesitter-cd4e0909948eb33d3959e133c16f837e4db122c6.zip | |
fix(locals): index matches with split capture names
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index ab0f89fc1..650d2fa3b 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["local.definition"] then - table.insert(defs, loc["local.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["local.scope"] and loc["local.scope"].node then - table.insert(scopes, loc["local.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["local.reference"] and loc["local.reference"].node then - table.insert(refs, loc["local.reference"].node) + if loc["local"]["reference"] and loc["local"]["reference"].node then + table.insert(refs, loc["local"]["reference"].node) end end |
