From d3f28cd1dab55c472ab1e34075163291fe34ba7a Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Fri, 12 Jan 2024 00:25:29 -0600 Subject: [PATCH] better diagnostics --- vim/.vim/lua/plugins/base.lua | 10 +++++ vim/.vim/lua/plugins/lsp_lines.lua | 7 +++- vim/.vim/lua/plugins/trouble.lua | 59 +++++++++++++++++++----------- 3 files changed, 52 insertions(+), 24 deletions(-) diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index 0e0fdf2..2e2494a 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -11,6 +11,16 @@ return { dependencies = { "nvim-lua/plenary.nvim" }, opts = {}, }, + { + "mawkler/modicator.nvim", + init = function() + -- These are required for Modicator to work + vim.o.cursorline = true + vim.o.number = true + vim.o.termguicolors = true + end, + opts = {}, + }, { "NvChad/nvim-colorizer.lua", ft = "lua", diff --git a/vim/.vim/lua/plugins/lsp_lines.lua b/vim/.vim/lua/plugins/lsp_lines.lua index 75b9493..1759d8e 100644 --- a/vim/.vim/lua/plugins/lsp_lines.lua +++ b/vim/.vim/lua/plugins/lsp_lines.lua @@ -1,5 +1,5 @@ return { - url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + "Maan2003/lsp_lines.nvim", event = "VimEnter", name = "lsp_lines.nvim", config = function() @@ -19,7 +19,10 @@ return { vim.schedule(function() vim.diagnostic.config({ - virtual_text = true, + virtual_text = false, + virtual_improved = { + current_line = "hide", + }, virtual_lines = { highlight_whole_line = false, only_current_line = true }, }) end) diff --git a/vim/.vim/lua/plugins/trouble.lua b/vim/.vim/lua/plugins/trouble.lua index 57b7d76..62973db 100644 --- a/vim/.vim/lua/plugins/trouble.lua +++ b/vim/.vim/lua/plugins/trouble.lua @@ -1,25 +1,40 @@ return { - "folke/trouble.nvim", - event = "VimEnter", - config = function() - -- Diagnostics - require("trouble").setup({ - signs = { - -- icons / text used for a diagnostic - error = " ", - warning = " ", - hint = " ", - information = " ", - other = " ", - }, - use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client - }) - end, - keys = { - { "xt", ":Telescope diagnostics" }, - { "xw", ":Trouble workspace_diagnostics" }, - { "xd", ":Trouble document_diagnostics" }, - { "[g", "lua vim.diagnostic.goto_prev()" }, - { "]g", "lua vim.diagnostic.goto_next()" }, + { + "luozhiya/lsp-virtual-improved.nvim", + event = { "LspAttach" }, + config = function() + require("lsp-virtual-improved").setup() + end, + }, + { + "dgagn/diagflow.nvim", + opts = { + toggle_event = { "InsertEnter" }, + }, + }, + { + "folke/trouble.nvim", + event = "VimEnter", + config = function() + -- Diagnostics + require("trouble").setup({ + signs = { + -- icons / text used for a diagnostic + error = " ", + warning = " ", + hint = " ", + information = " ", + other = " ", + }, + use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client + }) + end, + keys = { + { "xt", ":Telescope diagnostics" }, + { "xw", ":Trouble workspace_diagnostics" }, + { "xd", ":Trouble document_diagnostics" }, + { "[g", "lua vim.diagnostic.goto_prev()" }, + { "]g", "lua vim.diagnostic.goto_next()" }, + }, }, }