From 85e2428a021c541638d2c44364987f51b5c908aa Mon Sep 17 00:00:00 2001 From: Ibrahim Muftee Date: Mon, 23 Jun 2025 20:44:28 -0500 Subject: feat(nvim) begin new config --- .../nvim.new/lua/ibrahim/plugins/lsp-lines.lua | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dot_config/nvim.new/lua/ibrahim/plugins/lsp-lines.lua (limited to 'dot_config/nvim.new/lua/ibrahim/plugins/lsp-lines.lua') diff --git a/dot_config/nvim.new/lua/ibrahim/plugins/lsp-lines.lua b/dot_config/nvim.new/lua/ibrahim/plugins/lsp-lines.lua new file mode 100644 index 0000000..e15055e --- /dev/null +++ b/dot_config/nvim.new/lua/ibrahim/plugins/lsp-lines.lua @@ -0,0 +1,35 @@ +return { + 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. + -- { "di", desc = "Toggle [d]iagnostic [i]nline" }, + "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", "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, +} -- cgit v1.2.3