openlawlibrary / pygls

A pythonic generic language server
https://pygls.readthedocs.io/en/latest/
Apache License 2.0
568 stars 103 forks source link

fix: ensure server commands can be executed #368

Closed alcarney closed 1 year ago

alcarney commented 1 year ago

Screenshot_20230901_191518

This brings back the ability to execute commands provided by the language server in the vscode-playground extension.

Instead of encoding all the commands in the package.json file, the extension inspects the ServerCapabilities of the initialize response to determine which commands a server provides. It then presents a quick pick list of commands the user can choose to run.

This should mean commands (that don't take any arguments at least) now "just work" with the playground extension

This PR also re-defines the example configuration keys in the packae.json for json_server.py otherwise VSCode simply responds with null when the configuration values are requested

Closes #365

Code review checklist (for code reviewer to complete)

alcarney commented 1 year ago

The poetry install for windows+python 3.12 seems a little flakey too https://github.com/openlawlibrary/pygls/actions/runs/6052781183/job/16426922189?pr=368#step:4:67

Though since 3.12 is still a pre-release perhaps that's to be expected! :)

tombh commented 1 year ago

Ah yes, I've added that to the #367 falkey tracking issue 😅