added plugins
This commit is contained in:
parent
5aeddfdd5d
commit
42a8b0ff06
19 changed files with 322 additions and 74 deletions
39
lua/custom/plugins/trouble.lua
Normal file
39
lua/custom/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
'folke/trouble.nvim',
|
||||
cmd = { 'TroubleToggle', 'Trouble' },
|
||||
opts = { use_diagnostic_signs = true },
|
||||
keys = {
|
||||
{ '<leader>xx', '<cmd>TroubleToggle document_diagnostics<cr>', desc = 'Document Diagnostics (Trouble)' },
|
||||
{ '<leader>X', '<cmd>TroubleToggle workspace_diagnostics<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
||||
{ '<leader>xL', '<cmd>TroubleToggle loclist<cr>', desc = 'Location List (Trouble)' },
|
||||
{ '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', desc = 'Quickfix List (Trouble)' },
|
||||
{
|
||||
'[q',
|
||||
function()
|
||||
if require('trouble').is_open() then
|
||||
require('trouble').previous { 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',
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue