parser: only use parse to get a tree

This will avoid using internal data.
This commit is contained in:
Thomas Vigouroux 2020-11-03 21:08:36 +01:00
parent f999dc4113
commit 6eca8d2f38
4 changed files with 4 additions and 4 deletions

View file

@ -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