Skip to content
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: gelguy/wilder unusable with latest main commit #603

Closed
3 tasks done
languitar opened this issue Feb 28, 2023 · 3 comments · Fixed by #601
Closed
3 tasks done

bug: gelguy/wilder unusable with latest main commit #603

languitar opened this issue Feb 28, 2023 · 3 comments · Fixed by #601
Labels
bug Something isn't working

Comments

@languitar
Copy link

languitar commented Feb 28, 2023

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have searched the existing issues of lazy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.8.3

Operating system/version

Linux

Describe the bug

On current main (5af9380), the plugin https://github.com/gelguy/wilder.nvim cannot be used anymore. However, with stable (8077428) it works as expected.

Steps To Reproduce

  1. Start nvim with the config below via nvim -u repro.lua
  2. Press :. A popup menu appears from wilder
  3. Run :Lazy update to self-update lazy to latest main state
  4. Restart nvim
  5. Press :. No more popup appears.

Expected Behavior

Wilder just works.

Repro

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable",
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	{
		"gelguy/wilder.nvim",
		config = function()
			local wilder = require("wilder")
			wilder.setup({ modes = { ":", "/", "?" } })
			-- Disable Python remote plugin
			wilder.set_option("use_python_remote_plugin", 0)

			wilder.set_option("pipeline", {
				wilder.branch(
					wilder.cmdline_pipeline({
						fuzzy = 1,
						fuzzy_filter = wilder.lua_fzy_filter(),
					}),
					wilder.vim_search_pipeline()
				),
			})

			wilder.set_option(
				"renderer",
				wilder.renderer_mux({
					[":"] = wilder.popupmenu_renderer({
						highlighter = wilder.lua_fzy_highlighter(),
						left = {
							" ",
							wilder.popupmenu_devicons(),
						},
						right = {
							" ",
							wilder.popupmenu_scrollbar(),
						},
					}),
					["/"] = wilder.wildmenu_renderer({
						highlighter = wilder.lua_fzy_highlighter(),
					}),
				})
			)
		end,
		dependencies = { "romgrk/fzy-lua-native" },
	}
})
@languitar languitar added the bug Something isn't working label Feb 28, 2023
@folke folke closed this as completed in 79f85e5 Feb 28, 2023
@folke
Copy link
Owner

folke commented Feb 28, 2023

ok, I've added back a hack to work around incorrect require statements by some plugins.

The reason this no longer worked is because fzy-native-lua does a require that is not correct. See here https://github.com/romgrk/fzy-lua-native/blob/master/lua/fzy-lua-native.lua

That actually works with the default Neovim loader, because of a bug there. Lazy does it in the correct way.

Would be great if you could post a bug upstream to the fzy-native-lua repo to let them know about this.

It's also really bad practice to have lua/init.lua in a plugin. They should namespace all their lua modules under fzy-lua-native

@languitar
Copy link
Author

Thanks for the revert. I think I am still missing the details on how the require statement should look like before I could open a bug upstream..

@dinkopehar
Copy link

For anyone having some problems with Wilder, I had some problems with using wilder search and :UpdateRemotePlugins helped me solve it. My configuration is as simple as @languitar above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants