Skip to content

Commit 1a20fb5

Browse files
committed
fix(on_attach): clear lsp reference highlighting when leaving buffer
1 parent 7d1a7cb commit 1a20fb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/astrolsp/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ M.on_attach = function(client, bufnr)
161161
end,
162162
},
163163
{
164-
events = { "CursorMoved", "CursorMovedI" },
164+
events = { "CursorMoved", "CursorMovedI", "BufLeave" },
165165
desc = "clear references when cursor moves",
166166
callback = function() vim.lsp.buf.clear_references() end,
167167
},

0 commit comments

Comments
 (0)