Skip to content

Commit 952da85

Browse files
author
Tom Collings
committed
fix double-application of highlight to definition node
1 parent 65ad2ec commit 952da85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-treesitter-refactor/highlight_definitions.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function M.highlight_usages(bufnr)
3030
local usages = locals.find_usages(def_node, scope, bufnr)
3131

3232
for _, usage_node in ipairs(usages) do
33-
if usage_node ~= node_at_point then
33+
if usage_node ~= node_at_point and usage_node ~= def_node then
3434
ts_utils.highlight_node(usage_node, bufnr, usage_namespace, "TSDefinitionUsage")
3535
end
3636
end

0 commit comments

Comments
 (0)