diff --git a/lua/nvim-treesitter-refactor/highlight_definitions.lua b/lua/nvim-treesitter-refactor/highlight_definitions.lua index 1d717aa..6a7c5a9 100644 --- a/lua/nvim-treesitter-refactor/highlight_definitions.lua +++ b/lua/nvim-treesitter-refactor/highlight_definitions.lua @@ -30,7 +30,7 @@ function M.highlight_usages(bufnr) local usages = locals.find_usages(def_node, scope, bufnr) for _, usage_node in ipairs(usages) do - if usage_node ~= node_at_point then + if usage_node ~= node_at_point and usage_node ~= def_node then ts_utils.highlight_node(usage_node, bufnr, usage_namespace, "TSDefinitionUsage") end end