update
This commit is contained in:
parent
84c233094f
commit
04d22b2261
3 changed files with 38 additions and 22 deletions
|
|
@ -1,32 +1,16 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
-- dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
cmd = { "TroubleToggle", "Trouble" },
|
||||
config = function()
|
||||
require("trouble").setup({
|
||||
mode = "document_diagnostics",
|
||||
action_keys = { -- key mappings for actions in the trouble list
|
||||
-- map to {} to remove a mapping, for example:
|
||||
-- close = {},
|
||||
close = "q", -- close the list
|
||||
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||
refresh = "r", -- manually refresh
|
||||
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
|
||||
open_split = { "s" }, -- open buffer in new split
|
||||
open_vsplit = { "v" }, -- open buffer in new vsplit
|
||||
open_tab = { "t" }, -- open buffer in new tab
|
||||
jump_close = { "o" }, -- jump to the diagnostic and close the list
|
||||
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||
toggle_preview = "P", -- toggle auto_preview
|
||||
hover = "K", -- opens a small popup with the full multiline message
|
||||
preview = "p", -- preview the diagnostic location
|
||||
close_folds = { "zM", "zm" }, -- close all folds
|
||||
open_folds = { "zR", "zr" }, -- open all folds
|
||||
toggle_fold = { "zA", "za" }, -- toggle fold of current file
|
||||
previous = "k", -- previous item
|
||||
next = "j", -- next item
|
||||
action_keys = {
|
||||
open_split = "s",
|
||||
open_vsplit = "v",
|
||||
open_tab = "t",
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
||||
MAP("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue