diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2024-10-03 17:54:22 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-01 00:23:31 -0400 |
| commit | 7876fabd7c5c625194ee723972e63105eca4b505 (patch) | |
| tree | 8a60254fdba136242a10954bc0429747e509a46c /dot_config/nvim/lua/plugins/lsp-lines.lua | |
| parent | 25845fce1beb28e783e7f9495a0fadf19e26bee6 (diff) | |
feat(nvim): neovim config rewrite
Diffstat (limited to 'dot_config/nvim/lua/plugins/lsp-lines.lua')
| -rw-r--r-- | dot_config/nvim/lua/plugins/lsp-lines.lua | 70 |
1 files changed, 32 insertions, 38 deletions
diff --git a/dot_config/nvim/lua/plugins/lsp-lines.lua b/dot_config/nvim/lua/plugins/lsp-lines.lua index 8263d32..e15055e 100644 --- a/dot_config/nvim/lua/plugins/lsp-lines.lua +++ b/dot_config/nvim/lua/plugins/lsp-lines.lua @@ -1,41 +1,35 @@ --- lsp_lines --- --- A neat little plugin that shows diagnostics as separate lines instead of --- virtual text at the end of each line. This makes it easier to read. - return { - url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", - event = { "BufReadPre", "BufNewFile" }, - cond = not vim.g.vscode, - keys = { - -- The keys table here supports anything in the opts table for - -- vim.keymap.set, but be careful not to nest it in another table - -- like you would for that function. - -- { "<leader>di", desc = "Toggle [d]iagnostic [i]nline" }, - "<leader>di", - }, - opts = { - enabled = { - virtual_lines = true, - virtual_text = false, - }, - disabled = { - virtual_lines = false, - virtual_text = { spacing = 4, prefix = "●" }, - }, - }, - config = function(_, opts) - require("lsp_lines").setup() - local is_enabled = false - vim.diagnostic.config(opts.disabled) + url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + event = { "BufReadPre", "BufNewFile" }, + keys = { + -- The keys table here supports anything in the opts table for + -- vim.keymap.set, but be careful not to nest it in another table + -- like you would for that function. + -- { "<leader>di", desc = "Toggle [d]iagnostic [i]nline" }, + "<leader>di", + }, + opts = { + enabled = { + virtual_lines = true, + virtual_text = false, + }, + disabled = { + virtual_lines = false, + virtual_text = { spacing = 4, prefix = "●" }, + }, + }, + config = function(_, opts) + require("lsp_lines").setup() + local is_enabled = false + vim.diagnostic.config(opts.disabled) - vim.keymap.set("n", "<leader>di", function() - is_enabled = not is_enabled - if is_enabled then - vim.diagnostic.config(opts.enabled) - else - vim.diagnostic.config(opts.disabled) - end - end, { desc = "Toggle [d]iagnostics [i]nline" }) - end, + vim.keymap.set("n", "<leader>di", function() + is_enabled = not is_enabled + if is_enabled then + vim.diagnostic.config(opts.enabled) + else + vim.diagnostic.config(opts.disabled) + end + end, { desc = "Toggle [d]iagnostics [i]nline" }) + end, } |
