fix: picker config (#1094)
This commit is contained in:
@@ -383,6 +383,9 @@ builtin.lsp_workspace_diagnostics = require("telescope.builtin.lsp").workspace_d
|
|||||||
local apply_config = function(mod)
|
local apply_config = function(mod)
|
||||||
local pickers_conf = require("telescope.config").pickers
|
local pickers_conf = require("telescope.config").pickers
|
||||||
for k, v in pairs(mod) do
|
for k, v in pairs(mod) do
|
||||||
|
mod[k] = function(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
|
||||||
local pconf = vim.deepcopy(pickers_conf[k] or {})
|
local pconf = vim.deepcopy(pickers_conf[k] or {})
|
||||||
if pconf.theme then
|
if pconf.theme then
|
||||||
local theme = pconf.theme
|
local theme = pconf.theme
|
||||||
@@ -401,8 +404,7 @@ local apply_config = function(mod)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
mod[k] = function(opts)
|
|
||||||
opts = opts or {}
|
|
||||||
if pconf.attach_mappings and opts.attach_mappings then
|
if pconf.attach_mappings and opts.attach_mappings then
|
||||||
local attach_mappings = pconf.attach_mappings
|
local attach_mappings = pconf.attach_mappings
|
||||||
pconf.attach_mappings = nil
|
pconf.attach_mappings = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user