mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
feat(extras): big rework of default extras
This commit is contained in:
parent
0416376733
commit
525377dee9
13 changed files with 222 additions and 200 deletions
|
@ -28,10 +28,6 @@ function M.register(picker)
|
|||
return true
|
||||
end
|
||||
|
||||
if M.picker and M.picker.name ~= M.want() then
|
||||
M.picker = nil
|
||||
end
|
||||
|
||||
if M.picker and M.picker.name ~= picker.name then
|
||||
LazyVim.warn(
|
||||
"`LazyVim.pick`: picker already set to `" .. M.picker.name .. "`,\nignoring new picker `" .. picker.name .. "`"
|
||||
|
@ -42,17 +38,6 @@ function M.register(picker)
|
|||
return true
|
||||
end
|
||||
|
||||
---@return "telescope" | "fzf" | "snacks"
|
||||
function M.want()
|
||||
vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto"
|
||||
if vim.g.lazyvim_picker == "auto" then
|
||||
return LazyVim.has_extra("editor.snacks_picker") and "snacks"
|
||||
or LazyVim.has_extra("editor.telescope") and "telescope"
|
||||
or "fzf"
|
||||
end
|
||||
return vim.g.lazyvim_picker
|
||||
end
|
||||
|
||||
---@param command? string
|
||||
---@param opts? lazyvim.util.pick.Opts
|
||||
function M.open(command, opts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue