From 2f409272b40570285548158c02ec4d08b7611bae Mon Sep 17 00:00:00 2001 From: Rachel Lambda Samuelsson Date: Sun, 15 Oct 2023 21:45:49 +0200 Subject: [PATCH] only show diagnostics on save --- home/rachel.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/home/rachel.nix b/home/rachel.nix index 9ff68a1..1dd8720 100644 --- a/home/rachel.nix +++ b/home/rachel.nix @@ -204,6 +204,23 @@ in vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf }) 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 = '' set rnu nu