rice/nvim/lua/toggle_lsp_diagnostics.lua

12 lines
285 B
Lua
Raw Normal View History

2022-05-19 01:26:07 -07:00
local diagnostics_active = true
local toggle_diagnostics = function()
diagnostics_active = not diagnostics_active
if diagnostics_active then
vim.diagnostic.show()
else
vim.diagnostic.hide()
end
end
vim.keymap.set('n', '<leader>td', toggle_diagnostics)