only show diagnostics on save

This commit is contained in:
Rachel Lambda Samuelsson 2023-10-15 21:45:49 +02:00
parent 3cd018123f
commit 2f409272b4

View File

@ -204,6 +204,23 @@ in
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf }) vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf })
end, end,
}) })
vim.api.nvim_create_autocmd({ "BufNew"
, "TextChanged"
, "TextChangedI"
, "TextChangedP"
, "TextChangedT"
}, {
callback = function(args)
vim.diagnostic.disable(args.buf)
end
})
vim.api.nvim_create_autocmd({"BufWrite"}, {
callback = function(args)
vim.diagnostic.enable(args.buf)
end
})
''; '';
extraConfig = '' extraConfig = ''
set rnu nu set rnu nu