feat: Safer requireing of trouble.nvim
This commit is contained in:
parent
e2dc45069b
commit
32b0582274
1 changed files with 5 additions and 2 deletions
|
@ -151,8 +151,11 @@ return {
|
|||
config.defaults.keymap.builtin['<c-b>'] = 'preview-page-up'
|
||||
|
||||
-- trouble.nvim
|
||||
config.defaults.actions.files['ctrl-t'] =
|
||||
require('trouble.sources.fzf').actions.open
|
||||
local has_trouble, _ = pcall(require, 'trouble')
|
||||
if has_trouble then
|
||||
config.defaults.actions.files['ctrl-t'] =
|
||||
require('trouble.sources.fzf').actions.open
|
||||
end
|
||||
|
||||
local img_previewer = { 'chafa', '{file}', '--format=symbols' }
|
||||
|
||||
|
|
Loading…
Reference in a new issue