feat: updates the lsp diagnostics after using code actions

This commit is contained in:
2024-05-28 06:42:17 +02:00
parent 652843adb5
commit 3b3bd76258

View File

@@ -11,3 +11,13 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
command = "lua vim.highlight.on_yank {higroup='Visual',timeout=250}",
})
-- I'm using the 'TextChanged' autocmd (buffer changed in Normal mode)
-- to update the LSP diagnostics after selecting a code action
vim.api.nvim_create_autocmd({ "TextChanged" }, {
callback = function()
-- This updates the LSP diagnostics
vim.cmd("startinsert")
vim.cmd("stopinsert")
end,
})