TheBlob42 / idea-which-key

IdeaVim extension that displays available keybindings in a popup
GNU General Public License v3.0
181 stars 12 forks source link

VimShortcutKeyAction Problem is back #20

Closed rayk closed 2 years ago

rayk commented 2 years ago

On startup the following appears.

This is happening on IntelliJ IDEA 2021.3 (Ultimate Edition)

java.lang.Throwable: ID "VimShortcutKeyAction" is already taken by action "null (null)". Action "null (null)" cannot use the same ID null at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionIdCollision(ActionManagerImpl.java:1300) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1236) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1309) at eu.theblob42.idea.whichkey.WhichKeyExtension$init$1.run(WhichKeyExtension.kt:42) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506)

TheBlob42 commented 2 years ago

Can confirm that this is happening :thinking: strangely on my machine it does not occur with the community edition, but only with ultimate (can't test with any other Jetbrains IDE) will investigate

TheBlob42 commented 2 years ago

Ok I could solve it by updating the dependency, but I am not 100% sure that this is "the" solution. But regarding the just revealed log4j security vulnerability it probably makes sense to update these libs anyway :slightly_smiling_face: You can install the new version 0.6.1 manually or wait for the marketplace release

GreenHapi commented 2 years ago

Just updated to 0.6.1 and bug still persists. JetBrains Rider 2021.3.1, Windows 11

java.lang.Throwable: ID "VimShortcutKeyAction" is already taken by action "null (null)". Action "null (null)" cannot use the same ID null at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionIdCollision(ActionManagerImpl.java:1300) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1236) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1309) at eu.theblob42.idea.whichkey.WhichKeyExtension$init$1.run(WhichKeyExtension.kt:42) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506)

TheBlob42 commented 2 years ago

Can you answer me the following questions:

The last release triggered some compatibility issues: Compatible. 3 usages of scheduled for removal API, but I doubt that this can be the reason. Also I see this warning in the JetBrains checks, so maybe it has something to do with rider? But again I am not certain that this is really the issue here...

(failed) (optional) module com.intellij.modules.rider: Plugins declaring module 'com.intellij.modules.rider' are not found in Marketplace https://plugins.jetbrains.com

Well, I am gonna continue investigating, but I am always happy for ideas :detective:

@rayk can you check if the latest version fixes the issue for you? :thinking:

rayk commented 2 years ago

@TheBlob42 here is what I can observe.

  1. I have version 0.6.1 installed from the JetBrains store
  2. Besides the exception at the start, the plug appears to be working.

I say appears to be working, the only problem I have noticed (It could be related to my config) is the command buffer is getting stuck.

  1. I hit the leader key or g, Which key appears, as expected.
  2. I hit a key or key sequence that is not mapped, Which keys disappears and I get a beep. But key sequences continues to accumulate in the buffer. I can see this as it builds up in the bottom status bar. Esc , extra does not stop it listening, and it never timeouts. I have to close the tab and reopen it before Which-key returns to normal operations.

My Config for reference

""" Plugin Settings: Which Key Config --------------------------
set notimeout
set timeoutlen = 4000

let g:WhichKey_SortOrder = "by_description"
let g:WhichKey_ShowVimActions = "true"

let g:WhichKeyDesc_move_top = "gg   Move to first line"

let g:WhichKeyDesc_move_back_end = "ge   Move Back to previous end"

let g:WhichKeyDesc_next_tab = "gt   Tab (Focus On Next)"

let g:WhichKeyDesc_previous_tab = "gT   Tab (Focus On Previous)"

let g:WhichKeyDesc_goto_define = "gd   Definition Of ~ In new tab"
let g:WhichKeyDesc_get_ascii = "ga   Ascii ~ Get Value"

Also here is my intelli

IntelliJ IDEA 2021.3 (Ultimate Edition)
Build #IU-213.5744.223, built on November 27, 2021
Licensed to Ray King
Subscription is active until November 8, 2022.
Runtime version: 11.0.13+7-b1751.19 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 20
Registry:
    suggest.all.run.configurations.from.context=true
    debugger.valueTooltipAutoShowOnSelection=true

Non-Bundled Plugins:
    solarized (1.4)
    socrates.tabshifter (0.30)
    ski.chrzanow.foldableprojectview (1.1.1)
    ru.meanmail.plugin.requirements (2021.4.1-213-EAP-SNAPSHOT)
    pl.tigersoft.intellij.faker (1.1.2)
    org.toml.lang (213.5744.224)
    org.jetbrains.plugins.go (213.5744.223)
    mac-native (1.0)
    lermitage.intellij.iconviewer (1.12.0.193)
    lermitage.intellij.extra.icons (1.67.0.203)
    com.wakatime.intellij.plugin (13.1.4)
    com.vecheslav.darculaDarkerTheme (1.2.0)
    com.spidev.pubassist (1.1)
    com.shuzijun.markdown-editor (1.11)
    com.pine.fast.plugin (1.0.0)
    com.nerdscorner.android.plugin.github (2.1.1)
    com.jetbrains.grayTheme (1.2)
    com.jetbrains.CyanTheme (1.2)
    com.intellij.plugins.watcher (213.5744.122)
    com.intellij.plugins.macoskeymap (213.5744.3)
    me.serce.solidity (2.3.7)
    de.docksnet.puml.syntaxchecker (0.2.0)
    com.herokuapp.vuesion (1.9.2)
    com.herbert.george.flutter-snippets (2.0.0-stable-1)
    com.godwin.json.parser (1.4.2)
    com.github.novotnyr.jwt-intellij-plugin (0.11)
    com.github.lppedd.idea-conventional-commit (0.19.0)
    com.github.alexisgardin.intellijyamlsorter (1.0.1)
    com.giancarlocode.built-value-snippets (1.2.0)
    com.fwdekker.randomness (2.7.4)
    com.bloc.intellij_generator_plugin (3.1.0)
    com.4lex4.intellij.solarized (2.4.0)
    co.anbora.labs.firebase-syntax-highlighting (2.6.7)
    club.nutsoft.Github3Theme (1.1.6)
    bundled-intellij-idea-help (212.5712.14)
    awesome.console (0.1337.11)
    wide-task-browser (1.0.3)
    String Manipulation (8.23.203.000.0)
    Shifter (1.9.6)
    Rider UI Theme Pack (0.10.1)
    PlantUML integration (5.8.0)
    mobi.hsz.idea.gitignore (4.3.0)
    net.ashald.envfile (3.2.2)
    org.rust.lang (0.4.161.4292-213)
    com.intellij.lang.jsgraphql (3.1.2)
    com.dmarcotte.handlebars (213.5744.190)
    com.stepsize.tech-debt-reporter (1.13.1-203+)
    com.mallowigi (50.2.0)
    Dummy Text Generator (1.2.0)
    Dart (213.5744.122)
    io.flutter (63.2.4)
    de.mariushoefler.flutter_enhancement_suite (1.6.0)
    com.localizely.flutter-intl (1.16.0-2020.3)
    BrowseWordAtCaret (3.0.5)
    pl.pszklarska.pubversionchecker (1.3.3)
    nb-mind-map-idea (1.4.12)
    com.google.gct.core (21.12.1-213)
    zielu.gittoolbox (212.8.4)
    com.developerphil.adbidea (1.6.4)
    izhangzhihao.rainbow.brackets (6.21)
    AceJump (3.8.5)
    IdeaVIM (1.9.1)
    eu.theblob42.idea.whichkey (0.6.1)
    com.github.copilot (1.1.4.220)

Kotlin: 213-1.5.10-release-949-IJ5744.223

BTW keep up the good work, Coming back to Vim after being away for far too long, I have come to depend on which-key.

TheBlob42 commented 2 years ago
  1. I have version 0.6.1 installed from the JetBrains store

I was actually referring to the version for the IdeaVim plugin since WhichKey is built upon it :slightly_smiling_face: current version should be 1.9.1

I say appears to be working, the only problem I have noticed (It could be related to my config) is the command buffer is getting stuck.

  1. I hit the leader key or g, Which key appears, as expected.

  2. I hit a key or key sequence that is not mapped, Which keys disappears and I get a beep. But key sequences continues to accumulate in the buffer. I can see this as it builds up in the bottom status bar. Esc , extra does not stop it listening, and it never timeouts. I have to close the tab and reopen it before Which-key returns to normal operations.

Sorry, but I can not replicate this behavior at all and I am not sure that I understand correctly what you mean :thinking: could please share maybe a recording of the behavior you're facing and your complete config (as it seems you have only shared the part about which-key). I suspect this has something to do with another mapping or plugin, but I need more information for this

BTW keep up the good work, Coming back to Vim after being away for far too long, I have come to depend on which-key.

Thank you :heart: glad to hear that it helps people

rayk commented 2 years ago

Yep totally missed that, my current version of ideavim s 1.9.1.

I will create another issue for the above behaviour...

TheBlob42 commented 2 years ago

I have just uploaded a new version 0.6.2 with another attempt to fix the issue You can either try it out by installing it manually or wait for 1-2 days till it gets approved by JetBrains and you can download the update via the Marketplace JetBrains was super fast, it is already available on the marketplace :partying_face:

I will create another issue for the above behaviour...

Thank you :+1: this is most probably another problem

GreenHapi commented 2 years ago

I have IdeaVim 1.9.1 as well. 0.6.2 fixed issue for me. Thank you!

rayk commented 2 years ago

It is fixed with 0.6.2. Happy if this closed.

TheBlob42 commented 2 years ago

Glad to hear :slightly_smiling_face:

rayk commented 2 years ago

hey, @TheBlob42 here is a clue: just installed the update for the plantUML plugin and it trigged the same problem as above.

Upon removing the PlantUML plugin, all is well. I have dumped the plugin, so I do not have any issues with which key. No action is required for me, hope this offer a clue as to the root cause.

Thanks again

TheBlob42 commented 2 years ago

Glad to hear that you found a "workaround" even though it means to remove another plugin. I have had a quick look and installed the plugin, but strangely I can not reproduce it and from a quick glance at their source code I have no idea unfortunately :sweat_smile: