From 16a772452a515790c3304b358dd66a618fda3260 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 16 Feb 2025 13:20:06 +0200 Subject: [PATCH] feat(octo): add support for snacks picker (#5625) ## Description A [PR](https://github.com/pwntester/octo.nvim/pull/858) has landed in `octo.nvim` that adds initial support for `snacks.picker`. Enable it in `octo.nvim` Extra if user uses `snacks.picker`. I also changed the checks to use `has_extra`. This was needed for `snacks.picker`, since `has("snacks.nvim")` doesn't ensure that user also has `snacks.picker` enabled. For the others I just changed it for conformity, but if you think there might be something wrong about that (that I'm unable to think of), please feel free to change them back. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/util/octo.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index 9412e54c..d3316f5e 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -42,12 +42,14 @@ return { "pwntester/octo.nvim", opts = function(_, opts) vim.treesitter.language.register("markdown", "octo") - if LazyVim.has("telescope.nvim") then + if LazyVim.has_extra("editor.telescope") then opts.picker = "telescope" - elseif LazyVim.has("fzf-lua") then + elseif LazyVim.has_extra("editor.fzf") then opts.picker = "fzf-lua" + elseif LazyVim.has_extra("editor.snacks_picker") then + opts.picker = "snacks" else - LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") + LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`") end -- Keep some empty windows in sessions