-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Clicking in nvim window with legendary picker open breaks legendary #447
Comments
Interesting, I am able to reproduce, and weirdly, after adding some debug logs, it is executing properly all the way up to the legendary.nvim/lua/legendary/ui/init.lua Line 77 in a88744d
|
Possibly Neovim bug? Let's see if we can reproduce with a different |
Using mini.pick or fzf-lua I am not able to reproduce this behaviour - the window opened by either plugin closes as expected when clicking outside of it. Super strange that this only happens with Telescope + legendary, I tried all builtin telescope pickers and was not able to break it. minimal init.lua for swapping between all 3: local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
-- do not remove the colorscheme! it makes testing nicer
"folke/tokyonight.nvim",
{
"mrjones2014/legendary.nvim",
dependencies = {
-- {
-- "echasnovski/mini.pick",
-- version = "*",
-- config = function()
-- vim.ui.select = require("mini.pick").ui_select
-- end,
-- },
-- {
-- "ibhagwan/fzf-lua",
-- config = function()
-- require("fzf-lua").register_ui_select()
-- end,
-- },
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
{ "stevearc/dressing.nvim", opts = {} },
},
},
-- add any other pugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
require("legendary").setup({
-- add any options here
})
-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme! it makes testing nicer
vim.cmd([[colorscheme tokyonight]])
|
Confirmed that this is a bug in the dressing code, at least for the telescope select implementation. Any logging in this method is hit while the legendary select ui is functioning as normal, but is absent after breaking. |
Just for interests sake I also used fzf-lua + dressing, which does not break - so narrowed down to the dressing telescope select implementation. |
Created issue stevearc/dressing.nvim#150, feel free to close this! |
Similar Issues
Neovim Version
Steps to Reproduce
Expected Behavior
Finder opens as normal
Actual Behavior
No finder window appears, although legendary logs report normal behaviour.
Minimal Configuration to Reproduce
Output from :LegendaryLog
:LegendaryLog
output (click to expand)The second call here at 09:23:03 did not open any finder
Additional Details and/or Screenshots
Triple clicking may seem excessive - in my own config though it is only a single click (which often occurs when just refocusing the nvim window).
I also find this very strange as any telescope window handles this gracefully, and legendary just uses the vim.ui.select implementation of your choice.
The text was updated successfully, but these errors were encountered: