scztt / vscode-supercollider

MIT License
54 stars 6 forks source link

Add commands from SCIDE's `Server` menu #12

Closed okhick closed 1 year ago

okhick commented 1 year ago

Registers commands and key commands from the Server menu in SCIDE to push feature parity with SCIDE. Also adds key commands for supercollider.evaluateSelection, supercollider.evaluateRegion, supercollider.evaluateLine, and supercollider.searchHelp.

Added commands are as follows:

Requires more commands to be added to the ExecuteCommandProvider in LanguageServer.quark. I opened a PR for that here.

scztt commented 1 year ago

Great PR, thanks for this.

Some of those keyboard shortcuts are already bound by default in vscode? Cmd+Enter has ~10 bindings on my system, and Cmd+Alt+T is definitely bound to the "Close Other Editors In Group" command.

I'm not sure how to deal with this, but here's an idea, let me know if you agree:

  1. Set default shortcuts for the "core" commands: evaluate and cmd+period. If these stomp some unimportant default shortcuts, that's okay because they're essential / muscle memory.
  2. Assign the default ScIDE shortcut to any command if that shortcut isn't already used....
  3. If the shortcut IS already used, we can either pick a related + sensible keyboard shortcut or leave it empty?
okhick commented 1 year ago

That's a good point. I was leaning towards bringing in what SuperCollier has and if it conflicted with someone's VSCode workflows they could remap. But that might have not been the best decision. I do agree that we should implement those "core" commands at the minimum.

Another option would be to chord the non-core commands. So like the help command would be cmd+k cmd+d.

I'm also fine leaving them empty. If someone really depends on a key command to, for example, dump the node tree they can easily map something that works.

okhick commented 1 year ago

After thinking about it I've opted to remove all of the non-core key bindings. The VSCode command pallet offers pretty quick access to the actual commands from the keyboard and it's easy to make one's own key bindings if they want.