Closed towry closed 1 month ago
Can't reproduce.
sanity question: Do you have rust-analyzer installed?
Also, make sure your neovim is a stable one
sanity question: Do you have rust-analyzer installed?
Do you followed the repro steps exactly? The lsp need to be working to repro this.
Can repro in nvim v0.10.0, can not repro with LazyVim.
I did follow the steps. :)
Is everything up to date
Could be that having the init.lua
inside the same folder as the rust projects messes up things due to rust-analyzer indexing it. Try without the --clean flag. :)
Adding in the two plugins into the minimal template provided by astronvim works fine. :)
can confirm that I can replicate this only if the --clean flag is added to the nvim
command . Not sure tbh if this is something we can fix
Maybe report to the upstream plugin, but don't know which one to report. Which-key have bugs that related to the keymap that set <space>
to <nop>
which would cause which-key to not work, but I couldn't find any plugin that do this by ripgrep inside the lazy plugin folder. Also, localleader doesn't trigger wk too.
And can't repro with a minimal lazyvim setup, otherwise I would report to folke.
I'm honestly not sure. @mehalter Any input?
I don't have anything to add here. It seems like a which key bug and should be much more deeply investigated to figure out what is going on to be able to formulate a compelling issue upstream. --clean
tells neovim to completely use stock settings and ignore all plugins. Basically "clear the runtime path". This means all core, built in plugins are ignored. This is not something that should break which-key but it could if the developer doesn't realize it relies on some random plugins bundled with neovim. It just needs to be investigated more to figure out what's going on, but I'm like 99% certain based on the information here it's unrelated to AstroNvim/AstroCommunity
After some bisect debug, just find out the issue is located at https://github.com/AstroNvim/AstroNvim/blob/7d7e3f124d7789233f3faf200980a6ca36f11174/lua/astronvim/plugins/_astrocore_autocmds.lua#L146
If i remove this autocmd, the issue is gone.
To be more clear, the conditions to trigger this bug is:
--clean
is needed.@towry if you did a bisect, what commit did you find was the offending one?
oh you were just removing things, not doing a git bisect
@towry that makes total sense that removing that auto command would solve some random bug 😅 It's probably which-key
bug interacting with things like plugins getting loaded and that auto command would effectively make basically no plugins in astronvim load
@towry I found it has something to do with our autocommand triggering which is causing which-key to get into some weird state where it isn't triggering. This is definitely a which-key bug not properly setting up it's triggering. If you do some other operation like go to another window and come back then it starts working again in that main window 🤷🏼 I don't understand what's happening with which-key which is making it hard for me to open an issue upstream
Ok, I reduced this down to a repro.lua
file and attempted an issue. Hopefully it's well formed enough to get it figured out. Definitely a strange edge case it seems 🤷🏼
Can confirm it is working normal after updating the which-key plugin to the latest head commit.
Thanks.
Checklist
repro.lua
provided belowNeovim version (nvim -v)
NVIM v0.11.0-dev-build-20231109-2186-gdafd944a4
Operating system/version
macos 14.5
Terminal/GUI
kitty
Describe the bug
This issue maybe related to the community plugin rust and fzf-lua.
Inside a git repo (files must be unstaged) rust project, use fzf-lua to open a rust file, then try to use the leader key to trigger which-key, which-key doesn't show up.
Steps to Reproduce
cargo new --bin foo
cd foo
init.lua
insidefoo
.nvim --clean -u init.lua
<leader>ff
open fzf-lua picker and selectsrc/main.rs
with arrow key, then<cr>
to open it.main.rs
, the rust lsp should be working.Expected behavior
The which-key should show up when press leader key.
Screenshots
https://asciinema.org/a/7LviQ7wlduLpd7gmQoepu7t5t
Additional Context
rust
pack, is because if you press leader key, it will show which-key, and then you openmain.rs
, press leader key, it won't show which-key.Minimal configuration