mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-24 20:54:48 +02:00
feat(extras): added extra for snacks picker (#5368)
## Description See https://github.com/folke/snacks.nvim/pull/445 NOTE: I'm **not** going to replace `fzf-lua` anytime soon. Learned my lessons with that one :) <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
d1529f650f
commit
13044c298e
6 changed files with 147 additions and 6 deletions
|
@ -42,11 +42,13 @@ function M.register(picker)
|
|||
return true
|
||||
end
|
||||
|
||||
---@return "telescope" | "fzf"
|
||||
---@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.telescope") and "telescope" or "fzf"
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue