From ec1864f403819346bd4445783959e4be083b0a61 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 30 Aug 2024 09:58:14 +0200 Subject: nvim: update trouble config --- .config/nvim/lua/plugins/trouble.lua | 45 ++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 12 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua index b80aed3..c11778c 100644 --- a/.config/nvim/lua/plugins/trouble.lua +++ b/.config/nvim/lua/plugins/trouble.lua @@ -1,16 +1,37 @@ return { "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, + cmd = "Trouble", opts = {}, - config = function() - local map = require("helpers.keys").map - map("n", "xx", function() require("trouble").open() end, "trouble: open") - map("n", "xw", function() require("trouble").open("workspace_diagnostics") end, - "trouble: open workspace diagnostics") - map("n", "xd", function() require("trouble").open("document_diagnostics") end, - "trouble: open document diagnostics") - map("n", "xq", function() require("trouble").open("quickfix") end, "trouble: open quickfix") - map("n", "xl", function() require("trouble").open("loclist") end, "trouble: open loclist") - map("n", "gR", function() require("trouble").open("lsp_references") end, "trouble: open lsp references") - end, + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, } -- cgit v1.2.3-70-g09d2