vim: add plugin 'folke/trouble.nvim'
This commit is contained in:
parent
3c738d7230
commit
9948e26145
2 changed files with 24 additions and 0 deletions
|
@ -17,6 +17,11 @@ local config = function()
|
||||||
['<c-k>'] = actions.cycle_history_prev,
|
['<c-k>'] = actions.cycle_history_prev,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local has_trouble, trouble = pcall(require, 'trouble.providers.telescope')
|
||||||
|
if has_trouble then
|
||||||
|
mappings['<c-b>'] = trouble.open_with_trouble
|
||||||
|
end
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
-- ╭────────╮
|
-- ╭────────╮
|
||||||
|
|
19
config/nvim/lua/user/plugins/trouble.lua
Normal file
19
config/nvim/lua/user/plugins/trouble.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
return {
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
|
||||||
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local trouble = require('trouble')
|
||||||
|
|
||||||
|
trouble.setup {
|
||||||
|
padding = false, -- don't add an extra new line of top of the list
|
||||||
|
auto_preview = false, -- don't preview automatically
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>xx', function() trouble.open() end)
|
||||||
|
vim.keymap.set('n', '<leader>xw', function() trouble.open('workspace_diagnostics') end)
|
||||||
|
vim.keymap.set('n', '<leader>xd', function() trouble.open('document_diagnostics') end)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue