From d4aef6e19e643b8c278996d6fbe43223a46032cc Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 31 Aug 2026 18:06:50 +0200 Subject: [PATCH] trouble config --- nvim/.config/nvim/README.md | 5 +++-- nvim/.config/nvim/lua/romanzy/keymaps.lua | 1 + nvim/.config/nvim/lua/romanzy/plugins.lua | 1 + nvim/.config/nvim/lua/romanzy/plugins/trouble.lua | 8 ++++++++ nvim/.config/nvim/nvim-pack-lock.json | 4 ++++ 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 nvim/.config/nvim/lua/romanzy/plugins/trouble.lua diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md index fe834a5..6a6552a 100644 --- a/nvim/.config/nvim/README.md +++ b/nvim/.config/nvim/README.md @@ -115,10 +115,11 @@ Diagnostics: - `g.` open diagnostic float - `gl` send diagnostics to the location list - `gld` display diagnostic information -- `ti` toggle inline diagnostics -- `tv` toggle virtual diagnostics - `]g` jump to next warning or error - `[g` jump to previous warning or error +- `ti` toggle inline diagnostics +- `tv` toggle virtual diagnostics +- `xx` toggle project diagnostics with `:Trouble diagnostics toggle` ## Tree-sitter diff --git a/nvim/.config/nvim/lua/romanzy/keymaps.lua b/nvim/.config/nvim/lua/romanzy/keymaps.lua index b515d15..bfda6c3 100644 --- a/nvim/.config/nvim/lua/romanzy/keymaps.lua +++ b/nvim/.config/nvim/lua/romanzy/keymaps.lua @@ -125,6 +125,7 @@ vim.api.nvim_create_autocmd("LspAttach", { }) -- diagnostics +map("n", "xx", "Trouble diagnostics toggle", { desc = "toggle project diagnostics" }) map("n", "g.", vim.diagnostic.open_float, { desc = "line diagnostics" }) map("n", "gl", vim.diagnostic.setloclist, { desc = "diagnostic list" }) diff --git a/nvim/.config/nvim/lua/romanzy/plugins.lua b/nvim/.config/nvim/lua/romanzy/plugins.lua index afd7b9d..1a46a3a 100644 --- a/nvim/.config/nvim/lua/romanzy/plugins.lua +++ b/nvim/.config/nvim/lua/romanzy/plugins.lua @@ -2,6 +2,7 @@ require("romanzy.plugins.rose-pine") require("romanzy.plugins.mini") require("romanzy.plugins.lazygit") require("romanzy.plugins.diffview") +require("romanzy.plugins.trouble") require("romanzy.plugins.oil") require("romanzy.plugins.telescope") require("romanzy.plugins.nvim-treesitter") diff --git a/nvim/.config/nvim/lua/romanzy/plugins/trouble.lua b/nvim/.config/nvim/lua/romanzy/plugins/trouble.lua new file mode 100644 index 0000000..c1410fc --- /dev/null +++ b/nvim/.config/nvim/lua/romanzy/plugins/trouble.lua @@ -0,0 +1,8 @@ +vim.pack.add({ + { + src = "https://github.com/folke/trouble.nvim", + name = "trouble.nvim", + }, +}) + +require("trouble").setup() diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index f64c043..2de949e 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -55,6 +55,10 @@ "telescope.nvim": { "rev": "427b576c16792edad01a92b89721d923c19ad60f", "src": "https://github.com/nvim-telescope/telescope.nvim" + }, + "trouble.nvim": { + "rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a", + "src": "https://github.com/folke/trouble.nvim" } } }