From 36806958e139b464cfcc3a15da755af3497df02b Mon Sep 17 00:00:00 2001 From: venus Date: Tue, 24 Mar 2026 00:43:18 -0500 Subject: [PATCH] added trouble diagnostic tool --- init.lua | 4 +++- lazy-lock.json | 5 +++-- lua/plugins/.#trouble.lua | 1 + lua/plugins/trouble.lua | 47 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) create mode 120000 lua/plugins/.#trouble.lua create mode 100644 lua/plugins/trouble.lua diff --git a/init.lua b/init.lua index b306af0..4b32af9 100644 --- a/init.lua +++ b/init.lua @@ -32,7 +32,9 @@ require("lazy").setup({ { 'akinsho/toggleterm.nvim', version = "*", config = true}, -- terminal toggling and commands { 'nvim-java/nvim-java', config = function() require('java').setup() vim.lsp.enable('jdtls') end, }, --jave QOL { 'RRethy/base16-nvim', config = function() require('matugen').setup() end,}, --colorshceme for noctalia integration - { "lervag/vimtex", lazy = false, init = function() vim.g.vimtex_view_method = "zathura" end } -- for latex editing + { "lervag/vimtex", lazy = false, init = function() vim.g.vimtex_view_method = "zathura" end }, -- for latex editing + { 'windwp/nvim-autopairs', event = "InsertEnter", config = true }, + { "folke/ts-comments.nvim", event = "VeryLazy", }, -- qol for commenting }, }, -- Configure any other settings here. See the documentation for more details. diff --git a/lazy-lock.json b/lazy-lock.json index da4b7db..8d87913 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -16,8 +16,8 @@ "mini.nvim": { "branch": "main", "commit": "439cdcd6992bc9012efd7d8ed7a7b7a0f1fac32a" }, "mini.pick": { "branch": "main", "commit": "fe079c2bd894a5ee70b62f23d819620ef40c4949" }, "neogit": { "branch": "master", "commit": "d3890fc3cdf0859845a86b2be306bba01458df1a" }, - "nerdtree-visual-selection": { "branch": "master", "commit": "5214763209629d6652ebf183774a8b94cd2e6df0" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" }, "nvim-java": { "branch": "main", "commit": "602a5f7fa92f9c1d425a2159133ff9de86842f0a" }, @@ -37,8 +37,9 @@ "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, "themery.nvim": { "branch": "main", "commit": "bfa58f4b279d21cb515b28023e1b68ec908584b2" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, - "vim-nerdtree-syntax-highlight": { "branch": "master", "commit": "35e70334a2ff6e89b82a145d1ac889e82d1ddb4e" }, "vim-signature": { "branch": "master", "commit": "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc" }, "vim-termhere": { "branch": "main", "commit": "b66d429dd48b74802f09fd059bc499c253372a1c" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, diff --git a/lua/plugins/.#trouble.lua b/lua/plugins/.#trouble.lua new file mode 120000 index 0000000..48b79d4 --- /dev/null +++ b/lua/plugins/.#trouble.lua @@ -0,0 +1 @@ +venus@fw16-btw.84990:1774329150 \ No newline at end of file diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua new file mode 100644 index 0000000..b43e289 --- /dev/null +++ b/lua/plugins/trouble.lua @@ -0,0 +1,47 @@ +return { + "folke/trouble.nvim", + cmd = { "Trouble" }, + opts = { + modes = { + lsp = { + win = { position = "right" }, + }, + }, + }, + keys = { + { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, + { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, + { "cs", "Trouble symbols toggle", desc = "Symbols (Trouble)" }, + { "cS", "Trouble lsp toggle", desc = "LSP references/definitions/... (Trouble)" }, + { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, + { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, + { + "[q", + function() + if require("trouble").is_open() then + require("trouble").prev({ skip_groups = true, jump = true }) + else + local ok, err = pcall(vim.cmd.cprev) + if not ok then + vim.notify(err, vim.log.levels.ERROR) + end + end + end, + desc = "Previous Trouble/Quickfix Item", + }, + { + "]q", + function() + if require("trouble").is_open() then + require("trouble").next({ skip_groups = true, jump = true }) + else + local ok, err = pcall(vim.cmd.cnext) + if not ok then + vim.notify(err, vim.log.levels.ERROR) + end + end + end, + desc = "Next Trouble/Quickfix Item", + }, + }, +}