Add lsp_lines with custom toggle keymaps
This commit is contained in:
parent
47296cc673
commit
af42913e66
@ -33,6 +33,7 @@
|
|||||||
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
|
||||||
"keymap-amend.nvim": { "branch": "master", "commit": "b8bf9d820878d5497fdd11d6de55dea82872d98e" },
|
"keymap-amend.nvim": { "branch": "master", "commit": "b8bf9d820878d5497fdd11d6de55dea82872d98e" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
|
"lsp_lines.nvim": { "branch": "main", "commit": "cf2306dd332e34a3e91075b40bdd4f6db824b2ee" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4f81a9213fab94d4c074341acdf7118aaf959275" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "4f81a9213fab94d4c074341acdf7118aaf959275" },
|
||||||
@ -89,6 +90,7 @@
|
|||||||
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
|
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "84c5a71d825b6687a55aed6f41e98b92fd8e5454" },
|
"telescope.nvim": { "branch": "master", "commit": "84c5a71d825b6687a55aed6f41e98b92fd8e5454" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
||||||
|
"toggle-lsp-diagnostics.nvim": { "branch": "main", "commit": "4fbfb51e3902d17613be0bc03035ce26b9a8d05d" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" },
|
"toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
|
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
|
||||||
"tree-sitter-just": { "branch": "main", "commit": "4e5f5f3ff37b12a1bbf664eb3966b3019e924594" },
|
"tree-sitter-just": { "branch": "main", "commit": "4e5f5f3ff37b12a1bbf664eb3966b3019e924594" },
|
||||||
|
54
lua/plugins/lsp-lines.lua
Normal file
54
lua/plugins/lsp-lines.lua
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"WhoIsSethDaniel/toggle-lsp-diagnostics.nvim",
|
||||||
|
config = function()
|
||||||
|
require("toggle_lsp_diagnostics").init({ virtual_text = false })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
|
config = function()
|
||||||
|
require("lsp_lines").setup()
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>xv",
|
||||||
|
function()
|
||||||
|
require("lsp_lines").toggle()
|
||||||
|
require("toggle_lsp_diagnostics").toggle_virtual_text()
|
||||||
|
end,
|
||||||
|
desc = "Toggle lsp_lines diagnostics",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xy",
|
||||||
|
function()
|
||||||
|
if vim.diagnostic.config().virtual_text then
|
||||||
|
require("toggle_lsp_diagnostics").toggle_virtual_text()
|
||||||
|
else
|
||||||
|
require("lsp_lines").toggle()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "Toggle diagnostics virtual display",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xz",
|
||||||
|
function()
|
||||||
|
if not vim.diagnostic.config().virtual_text then
|
||||||
|
require("lsp_lines").toggle()
|
||||||
|
end
|
||||||
|
require("toggle_lsp_diagnostics").toggle_diagnostics()
|
||||||
|
end,
|
||||||
|
desc = "Toggle all diagnostics",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = false,
|
||||||
|
virtual_lines = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user