mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(editor): telescope init error when trouble.nvim is disabled (#3518)
I got this error message when opening telescope. ``` Failed to run `config` for telescope.nvim ...l/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/editor.lua:241: module 'trouble.sources.telescope' not found: ^Ino field package.preload['trouble.sources.telescope'] ... ``` After investigating it, the reason was I have `trouble.nvim` disabled but the default base `opts` function is loading it. I tried wrapping it with a function to lazy load the `trouble.nvim` module and it worked in my local setup.
This commit is contained in:
parent
827aa5380a
commit
c452fd730c
1 changed files with 3 additions and 1 deletions
|
@ -240,7 +240,9 @@ return {
|
|||
opts = function()
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
local open_with_trouble = require("trouble.sources.telescope").open
|
||||
local open_with_trouble = function(...)
|
||||
return require("trouble.sources.telescope").open(...)
|
||||
end
|
||||
local find_files_no_ignore = function()
|
||||
local action_state = require("telescope.actions.state")
|
||||
local line = action_state.get_current_line()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue