Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit d8b74fa

Browse files
AmletoTom Collings
andauthored
fix(highlight): don't apply usage highlight to definition node (#55)
Co-authored-by: Tom Collings <[email protected]>
1 parent 65ad2ec commit d8b74fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-treesitter-refactor/highlight_definitions.lua

Lines changed: 1 addition & 1 deletion
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)