keyind to toggle lsp diagnostic virtual text

This commit is contained in:
Antoine Vaure 2025-07-28 17:28:23 +02:00
parent 91e4921619
commit 3b5da664ee

View file

@ -49,6 +49,14 @@ end
s("n", "<leader>tw", "<cmd> set wrap! <cr>", { desc = "toggle line wrap" }) s("n", "<leader>tw", "<cmd> set wrap! <cr>", { desc = "toggle line wrap" })
local toggle_lsp_virtual_text = function ()
vim.diagnostic.config({
virtual_text = not vim.diagnostic.config().virtual_text
})
end
s("n", "<leader>tv", toggle_lsp_virtual_text, { desc = "toggle virtual text for diagnostics" })
function copy_filename_and_line () function copy_filename_and_line ()
local filename = vim.fn.expand("%:t") local filename = vim.fn.expand("%:t")
local line = vim.fn.line(".") local line = vim.fn.line(".")