mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
parser: only use parse to get a tree
This will avoid using internal data.
This commit is contained in:
parent
f999dc4113
commit
6eca8d2f38
4 changed files with 4 additions and 4 deletions
|
|
@ -235,7 +235,7 @@ function M.find_usages(node, scope_node, bufnr)
|
|||
|
||||
if not node_text or #node_text < 1 then return {} end
|
||||
|
||||
local scope_node = scope_node or parsers.get_parser(bufnr).tree:root()
|
||||
local scope_node = scope_node or parsers.get_parser(bufnr):parse():root()
|
||||
local usages = {}
|
||||
|
||||
for match in M.iter_locals(bufnr, scope_node) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue