feat(nvim): Add mapping to toggle diagnostics

This commit is contained in:
Price Hiller 2022-05-22 03:55:41 -05:00
parent c68012155d
commit 94ded0b298

View File

@ -23,6 +23,18 @@ M.setup = function()
-- Set current focused file as cwd
map('n', '<leader>cd', ':cd %:p:h<CR>')
local diagnostics_active = true
map('n', '<leader>lt', '', {
callback = function()
diagnostics_active = not diagnostics_active
if diagnostics_active then
vim.diagnostic.show()
else
vim.diagnostic.hide()
end
end,
})
end
return M