fix(pick): allow configuring pickers without LazyExtras. Fixes #3626
This commit is contained in:
@ -301,13 +301,13 @@ return {
|
||||
{
|
||||
import = "lazyvim.plugins.extras.editor.fzf",
|
||||
enabled = function()
|
||||
return LazyVim.has_extra("editor.fzf")
|
||||
return LazyVim.pick.want() == "fzf"
|
||||
end,
|
||||
},
|
||||
{
|
||||
import = "lazyvim.plugins.extras.editor.telescope",
|
||||
enabled = function()
|
||||
return not LazyVim.has_extra("editor.fzf")
|
||||
return LazyVim.pick.want() == "telescope"
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
if lazyvim_docs then
|
||||
-- In case you don't want to use `:LazyExtras`,
|
||||
-- then you need to set the option below.
|
||||
vim.g.lazyvim_picker = "fzf"
|
||||
end
|
||||
|
||||
---@class FzfLuaOpts: lazyvim.util.pick.Opts
|
||||
---@field cmd string?
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
if lazyvim_docs then
|
||||
-- In case you don't want to use `:LazyExtras`,
|
||||
-- then you need to set the option below.
|
||||
vim.g.lazyvim_picker = "telescope"
|
||||
end
|
||||
|
||||
local have_make = vim.fn.executable("make") == 1
|
||||
local have_cmake = vim.fn.executable("cmake") == 1
|
||||
|
||||
@ -49,6 +55,9 @@ return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
cmd = "Telescope",
|
||||
enabled = function()
|
||||
return LazyVim.pick.want() == "telescope"
|
||||
end,
|
||||
version = false, -- telescope did only one release, so use HEAD for now
|
||||
dependencies = {
|
||||
{
|
||||
@ -228,6 +237,9 @@ return {
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
lazy = true,
|
||||
enabled = function()
|
||||
return LazyVim.pick.want() == "telescope"
|
||||
end,
|
||||
init = function()
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.ui.select = function(...)
|
||||
@ -245,6 +257,9 @@ return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = function()
|
||||
if LazyVim.pick.want() ~= "telescope" then
|
||||
return
|
||||
end
|
||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||
-- stylua: ignore
|
||||
vim.list_extend(Keys, {
|
||||
|
Reference in New Issue
Block a user