getappmap / appmap-intellij-plugin

MIT License
38 stars 9 forks source link

Add keyboard shortcut open the Navie webview #694

Closed jansorg closed 6 months ago

jansorg commented 6 months ago

This PR adds a shortcut for "Explain with Navie":

AFAIK the VSCode plugin uses Ctrl + A, N on macOS. But Ctrl+A is already used in JetBrains IDEs. Ctrl + A is already assigned on macOS (action "go to start of line") and this action overrides our own shortcut. Option + A, N is working fine on my setup of macOS.

github-actions[bot] commented 6 months ago

AppMap runtime code review

Summary Status
Failed tests :white_check_mark: All tests passed
API changes :zero: No API changes
Security flaws :white_check_mark: None detected
Performance problems :white_check_mark: None detected
Code anti-patterns :white_check_mark: None detected
New AppMaps :zero: No new AppMaps
dividedmind commented 6 months ago

We've had a discussion about the keybindings and settled on Alt+A to start an Appmap chord, so then Alt+A N can be Navie, Alt+A E can be explain, etc. What do you think? I think IntelliJ support chords.

kgilpin commented 6 months ago

Here's a suggestion as well (Cmd and Alt being aliases afaik).

Cmd-A or Alt-A for AppMap

D for Delete N for Navie M for Maps (view)

Screen Shot 2024-05-03 at 10 40 48 AM
jansorg commented 6 months ago

I've updated this PR to use ALT+A, N (or CMD+A, N on macOS) to show the Navie webview.

We currently don't have a separate action to open the AppMap tool window. The built-in keyboard navigation would be to use ctrl + tab and then the shortcut for the tool window. But I'll add an action for consistency and easier navigation.

For Delete All AppMaps we don't have an action in the global list of actions. It's available in the context menu of AppMaps tree, but not yet in the global actions. I could add such an action, if you like.

jansorg commented 6 months ago

We've had a discussion about the keybindings and settled on Alt+A to start an Appmap chord, so then Alt+A N can be Navie, Alt+A E can be explain, etc. What do you think? I think IntelliJ support chords.

@dividedmind What's the difference between "Navie" and "Explain"?

dividedmind commented 6 months ago

We've had a discussion about the keybindings and settled on Alt+A to start an Appmap chord, so then Alt+A N can be Navie, Alt+A E can be explain, etc. What do you think? I think IntelliJ support chords.

@dividedmind What's the difference between "Navie" and "Explain"?

None really, currently, I think. I somehow had in my mind that there was a separate command to talk to Navie about current code selection. (Which could be a good idea, @kgilpin ?)

kgilpin commented 6 months ago

For now there’s only one Navie command. If you’ve made a code selection, it will be applied.

dustinbyrne commented 6 months ago

I'm going to close this until someone is able to dedicate time to identifying a worthwhile cross-platform keybinding.