feat(nvim): Add mapping to toggle diagnostics
This commit is contained in:
parent
c68012155d
commit
94ded0b298
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user