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

can't run language server commands in vscode-playground example #365

Closed
RossBencina opened this issue Sep 1, 2023 · 1 comment · Fixed by #368
Closed

can't run language server commands in vscode-playground example #365

RossBencina opened this issue Sep 1, 2023 · 1 comment · Fixed by #368
Assignees

Comments

@RossBencina
Copy link
Contributor

RossBencina commented Sep 1, 2023

I followed the instructions to launch the vscode-playground example:

https://github.com/openlawlibrary/pygls/blob/main/examples/vscode-playground/README.md

Hitting F5 successfully launches VSCode with the example plugin loaded. I verified that the server was running by checking the output window. JSON validation is working, I get red squiggles under errors.

Now the problems start:

Selecting "pygls: Execute Command" from the command palette results in an error:

image

Furthermore, none of the commands from the json_server example are available in the command palette. For example "Count Down 10 Seconds [Non Blocking]" is not present.

I expected all of the commands that are implemented in json_server.py to be available and to run correctly:

https://github.com/openlawlibrary/pygls/blob/main/examples/servers/json_server.py

I tried rolling back to 05ba2c4 (just prior to the refactoring that deleted the json-vscode-extension. EDIT: in this case, I am able to load the json-vscode-extension example, and the commands do run. For example I am able to select "Count Down 10 Seconds [Non Blocking]" from the command palette, and it displays the countdown notifications as expected.

@alcarney
Copy link
Collaborator

alcarney commented Sep 1, 2023

Apologies! This was on my todo list when refactoring the extension - I must've forgotten to do it :/

Once #368 lands it should be possible to execute pygls: Execute Command and be presented with a quick pick list of commands that the server you're currently running provides. It does make running a command via the palette a 2-step process - but the extension should work with any server without needing to update the package.json file

Screenshot_20230901_191518

@tombh tombh closed this as completed in #368 Sep 1, 2023
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 a pull request may close this issue.

2 participants