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

Doesn't work. #44

Closed
idelice opened this issue Oct 4, 2023 · 8 comments
Closed

Doesn't work. #44

idelice opened this issue Oct 4, 2023 · 8 comments

Comments

@idelice
Copy link

idelice commented Oct 4, 2023

I installed plugins: IdeaVim and Which-Key through Intellij.

I added 'set which-key' inside .ideavimrc in my home dir.

I sourced .ideavimrc.

Nothing happens when pressing space.

@TheBlob42
Copy link
Owner

I would need some more information about your setup to check for any issues:
Intellij version, IdeaVim version, WhichKey version and your .ideavimrc configuration

@idelice
Copy link
Author

idelice commented Oct 10, 2023

I would need some more information about your setup to check for any issues: Intellij version, IdeaVim version, WhichKey version and your .ideavimrc configuration

IntelliJ IDEA 2023.1.5 (Community Edition)
Build #IC-231.9392.1, built on July 25, 2023
Runtime version: 17.0.7+10-b829.16 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.4.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true

Non-Bundled Plugins:
    Docker (231.9392.1)
    IdeaVIM (2.5.1)
    DBN (3.3.9882.0)

Kotlin: 231-1.8.21-IJ9392.1

ideavim + whichkey latest from todays date. and .ideavimrc contains only that config from your doc "set which-key" or something like that.

@TheBlob42
Copy link
Owner

Please share your full .ideavimrc with me. In most cases this is a configuration problem, a typo or something similar (even though it does not contain a lot).

From your system setup I don't see any reason why the plugin should not work 🤔

@TheBlob42
Copy link
Owner

@Delice0 is this issue still present? If so please share your .ideavimrc so I can investigate.
Otherwise I would close this issue

@TheBlob42
Copy link
Owner

So I got a notification about a new comment here, which for some reason is not visible anymore:

Having the same issue.
Tested it on windows and linux systems, and using different JBR runtimes. When I uninstall the plugin I get some logs that state that which-key is an unknown command in my .ideavimrc. However after installing the plugin It appears as if which-key was a noop. No logs, pressing space just moves the cursor.

My .ideavimrc:

set which-key

However I wanted to address this anyway since its the same issue as @Delice0 and I think I now finally understand what the issue is here 😅

It seems like there is a discrepancy for new users about what which-key is actually doing and what it is not. So for everybody in this issue and everybody finding this let me explain:

The plugin which-key is only there to showcase the VIM mappings that you have configured yourself (in your .ideavimrc) in a popup window. It does not set any keybindings itself. The GIF in the README is an example of how it can look in case you have a lot of mappings defined (the example uses the wonderful intellimacs project). It seems to me that this is a common misunderstanding (see #46), so I will adapt the README to make this distinction more clear.

For those wondering why they see no popup, add a few key mappings to your .ideavimrc and try again:

set which-key

nnoremap <Space>wv :vertical splitv<CR>
nnoremap <Space>ws :split<CR>
nnoremap <Space>wd :close<CR>

Now pressing <Space> and <Space>w should show a popup with all the above mappings

I hope this helps 🙂

@clemenscodes
Copy link

Thanks! Yeah, my bad, I did assume that an empty popup would come up if I had no keybinds set. Now this works!

@idelice
Copy link
Author

idelice commented Nov 3, 2023

@Delice0 is this issue still present? If so please share your .ideavimrc so I can investigate. Otherwise I would close this issue

set which-key

that's it.

@TheBlob42
Copy link
Owner

@Delice0 then check my previous comment #44 (comment) for an explanation

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