mirror of
https://github.com/ksyasuda/rice.git
synced 2025-12-05 02:53:39 -08:00
add toggle lsp diagnostic
This commit is contained in:
11
nvim/lua/toggle_lsp_diagnostics.lua
Normal file
11
nvim/lua/toggle_lsp_diagnostics.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user