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

which-key <c-d> <c-u> scrolling is broken with neoscroll.nvim enabled #111

Open
den-is opened this issue Sep 2, 2024 · 4 comments
Open

Comments

@den-is
Copy link

den-is commented Sep 2, 2024

I discovered that while neoscroll plugin is enabled which-key window scrolling is not working.
Disabling neoscroll fixed issue.
I'm not lua/neovim pro, and was not able to discover if it is possible to disable neoscroll for whick-key, or how to make which-key to work while neoscroll is enabled.

I have created issue in both repos:
folke/which-key.nvim#839 - This is issue kinda has more details and example setup.

@karb94
Copy link
Owner

karb94 commented Sep 2, 2024

Thanks for reporting the issue. This is likely because which-key does not switch focus to the which-key floating window. This is a similar issue to #79 where telescope creates a preview window that is not in focus.

Neoscroll can now scroll non-active windows but I'll need to check how which-key implements window scrolling before I can say for sure I can build support for it.

@Pairadux
Copy link

Pairadux commented Dec 5, 2024

Putting this here to say that I attempted to solve this with autocmds, i.e., disabling neoscroll when whickey is active, and re-enabling when whickey is closed. But this solution produced some crazy bugs. Hopefully this issue is fixable.

@Pairadux
Copy link

Pairadux commented Dec 6, 2024

I circumvented this issue "temporarily" by changing whichkeys default "scroll_up" and "scroll_down" keys. I will share my config in case it helps someone else out with this issue until it is resolved.

	{
		"folke/which-key.nvim",
		event = "VeryLazy",
		opts = {
			keys = {
				scroll_down = "<c-s-d>",
				scroll_up = "<c-s-u>",
			},
		},
	},

@Pairadux
Copy link

Pairadux commented Dec 6, 2024

I circumvented this issue "temporarily" by changing whichkeys default "scroll_up" and "scroll_down" keys. I will share my config in case it helps someone else out with this issue until it is resolved.

	{
		"folke/which-key.nvim",
		event = "VeryLazy",
		opts = {
			keys = {
				scroll_down = "<c-s-d>",
				scroll_up = "<c-s-u>",
			},
		},
	},

this binds scroll_down to CTRL+SHIFT+d and scroll_up to CTRL+SHIFT+U, which works fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants