From 33c23c282c964232ccfde26e9151a6039022701f Mon Sep 17 00:00:00 2001 From: xesc Date: Mon, 17 Jun 2024 21:12:05 +0200 Subject: [PATCH] update trouble after rework --- lua/plugin/lspconfig.lua | 2 +- lua/plugin/lualine.lua | 2 +- lua/plugin/trouble.lua | 39 +++++++++++++++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/lua/plugin/lspconfig.lua b/lua/plugin/lspconfig.lua index 008667e..31c0f04 100644 --- a/lua/plugin/lspconfig.lua +++ b/lua/plugin/lspconfig.lua @@ -135,7 +135,7 @@ return { icons = { package_installed = "✔", package_pending = "➜", - package_uninstalled = "✗" + package_uninstalled = "✘" } } }) diff --git a/lua/plugin/lualine.lua b/lua/plugin/lualine.lua index d856bfe..60f2e6e 100644 --- a/lua/plugin/lualine.lua +++ b/lua/plugin/lualine.lua @@ -73,7 +73,7 @@ return { 'diagnostics', color = { gui = 'bold', bg = '#141617' }, sections = { 'error', 'warn', 'info', 'hint' }, - symbols = { error = "󰈸 ", warn = " ", info = " ", hint = "󰌶 " }, + symbols = { error = "✘ ", warn = " ", info = " ", hint = " " }, padding = 1, update_in_insert = true }, diff --git a/lua/plugin/trouble.lua b/lua/plugin/trouble.lua index 9cfa8ad..943da86 100644 --- a/lua/plugin/trouble.lua +++ b/lua/plugin/trouble.lua @@ -1,10 +1,41 @@ return { { "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = { - use_diagnostic_signs = true, - vim.keymap.set("n", "T", function() require("trouble").toggle() end), + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "xs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "xl", + "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)", + }, }, } + + }