From 282e33ad9c96a44a092ab8a356bba7626c838b68 Mon Sep 17 00:00:00 2001 From: Steven Sojka Date: Wed, 12 Aug 2020 07:38:15 -0500 Subject: fix(definitions): optimize and fix definition highlighting --- lua/nvim-treesitter/refactor/highlight_definitions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/nvim-treesitter/refactor/highlight_definitions.lua') diff --git a/lua/nvim-treesitter/refactor/highlight_definitions.lua b/lua/nvim-treesitter/refactor/highlight_definitions.lua index 71081442..8a75980d 100644 --- a/lua/nvim-treesitter/refactor/highlight_definitions.lua +++ b/lua/nvim-treesitter/refactor/highlight_definitions.lua @@ -21,7 +21,7 @@ function M.highlight_usages(bufnr) end local def_node, scope = locals.find_definition(node_at_point, bufnr) - local usages = locals.find_usages(node_at_point, scope) + local usages = locals.find_usages(def_node, scope, bufnr) for _, usage_node in ipairs(usages) do if usage_node ~= node_at_point then -- cgit v1.2.3