atom-community / atom-languageclient

Provide integration support for adding Language Server Protocol servers to Atom.
https://www.npmjs.com/package/atom-languageclient
MIT License
45 stars 13 forks source link

feat: API for registering custom callbacks for Commands #117

Closed deankevorkian closed 3 years ago

deankevorkian commented 3 years ago

Followup to #12 , discussions made there and there.

A developer can register a callback that happens when an executeCommand is fired for DoBlaBlaJavaThingyTypeBeat. If a command was not registered with a callback by the developer - let that Command reach the server. Otherwise - fire the callback that was registered by the developer.

This brings package developers full control as to how Commands are executed "globally". i.e - they can register a command and a callback for it, and have parts of their package (like code actions, or other custom areas) call those Commands and have them executed just like VSCode does today. But, this will probably be mainly needed/used for code actions, where the standard isn't explicit with Commands are executed.

I could also use some help testing this with ide-java as I'm not used to building and debugging extensions. I can do this myself but if anyone can easily test this let me know.

@UziTech

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: