Added inline diagnostics toggle
This commit is contained in:
@@ -22,3 +22,11 @@ map("n", "<C-j>", "<C-w>j", { desc = "Down window" })
|
||||
map("n", "<C-k>", "<C-w>k", { desc = "Up window" })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Right window" })
|
||||
|
||||
local diagnostics_visible = true
|
||||
|
||||
map("n", "<leader>td", function()
|
||||
diagnostics_visible = not diagnostics_visible
|
||||
vim.diagnostic.config({
|
||||
virtual_text = diagnostics_visible,
|
||||
})
|
||||
end, { desc = "Toggle inline diagnostics" })
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
|
||||
@@ -28,4 +28,3 @@ opt.mouse = "a"
|
||||
|
||||
opt.updatetime = 250
|
||||
opt.timeoutlen = 400
|
||||
|
||||
|
||||
Reference in New Issue
Block a user