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

set extensionKind to workspace & Use pylsp directly as the language server #121

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

microhobby
Copy link

This change was the way to make it work for me.
I use it in a Windows environment but in WSL 2.

This probably fixes #90

Was not clear to me if the pylsp need to be run apart from the extension, in my environment it was blocked in the client.start forever, but using it directly worked.

Setting the extensionKind to workspace allows the extension to be
activated in the context of a workspace. This is useful for users
who uses the extension connecting the VS Code UI to a remote VS Code
server. This way the pylsp used will be always the one installed from
the workspace environment.

Also bump the vscode packages.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Previously, the extension was using a TCP connection, but was not
clear how the pylsp was being started. Also the pylsp.executable
was being set, but it's value was not being used.

This patch changes the way the language server is started, now
using the pylsp executable directly, and also uses the pylsp.executable
value to set the command to be executed.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
"publisher": "jnoortheen",
"icon": "images/icon.png",
"license": "MIT",
"engines": {
"vscode": ">=1.75.0"
},
"extensionKind": [
"workspace"
],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the implication if this? does this work when we edit a single file ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this works even though the user open a single file without a workspace opened. The extensionKind is only to set the https://code.visualstudio.com/api/advanced-topics/extension-host#preferred-extension-location

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.

Appears not to work when ssh'd into remote machine
2 participants