From af8e490bd900626638b5249d9184e83ac2734e53 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 21 Jan 2023 13:14:48 -0500 Subject: Disable ale to remove doubled up diagnostics. Add option to toggle them on and off --- init.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 9b9795a..41c8443 100644 --- a/init.lua +++ b/init.lua @@ -81,7 +81,7 @@ require('packer').startup(function(use) use 'lewis6991/gitsigns.nvim' -- replacement for syntastic, seems to work okay out of the box - use 'dense-analysis/ale' + -- use 'dense-analysis/ale' use { 'nvim-lualine/lualine.nvim', -- status line @@ -228,3 +228,19 @@ vim.api.nvim_create_user_command( end, { nargs = 0 } ) + +-- Expose vim.diagnostic.enable/disable as a quick toggle ex command +local diag = true +vim.api.nvim_create_user_command( + 'DiagToggle', + function() + if diag then + vim.diagnostic.disable() + diag = false + else + vim.diagnostic.enable() + diag = true + end + end, + { nargs = 0 } +) -- cgit v1.2.3