Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure server commands can be executed #368

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

alcarney
Copy link
Collaborator

@alcarney alcarney commented Sep 1, 2023

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)

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Commit messages are meaningful (see this for details)
  • Tests have been included and/or updated, as appropriate
  • Docstrings have been included and/or updated, as appropriate
  • Standalone docs have been updated accordingly

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
@alcarney
Copy link
Collaborator Author

alcarney commented Sep 1, 2023

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
Copy link
Collaborator

tombh commented Sep 1, 2023

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

@tombh tombh merged commit fd6e948 into openlawlibrary:main Sep 1, 2023
16 of 17 checks passed
@alcarney alcarney deleted the playground-commands branch September 1, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can't run language server commands in vscode-playground example
2 participants