diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-03 21:08:36 +0100 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-03 21:16:51 +0100 |
| commit | 6eca8d2f3860e7d76b0b524877c13206c2900b01 (patch) | |
| tree | 2175e9c40c4343ceab56c12516d914bd4c2e421e /lua/nvim-treesitter/locals.lua | |
| parent | f999dc41131c3c69f2411af13597932c042e8e5a (diff) | |
parser: only use parse to get a tree
This will avoid using internal data.
Diffstat (limited to 'lua/nvim-treesitter/locals.lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index 368fd202..4535fa60 100644 --- a/lua/nvim-treesitter/locals.lua +++ b/lua/nvim-treesitter/locals.lua @@ -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 |
