Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Recommended Setup for Python in code-server without Pylance#6707

Answeredbycode-asher
shinyshoes404 asked this question inQ&A
Discussion options

Hi, all. I setup a Coder server with a template that creates workspaces running code-server. I was feeling very excited about this solution for Python development until I realized that semantic token highlighting (learned what this was after much googling) is not happening in the way I am used to in the desktop version of VS Code. After digging around, it appears this is due to the fact that Pylance is closed source and not available in the code-server extensions marketplace.

Is there any way to make the highlighting in code-server function the same as in VS Code desktop? If not, what is the recommended configuration for the best experience developing with Python in code-server?

Also, shout-out to Coder. The open source solution is perfect for a hands-on lab I need to do with a small group of college students.

code-server highlighting

image

VS Code Desktop highlighting

image

You must be logged in to vote

Unfortunately I have no experience with Jedi or the Python extensions myself and am not aware of any guides. It sounds like Jedi might be buggy so you may want to report that to them.

Does this extension look like it would help at all? I saw it linked while looking at Python issues on VSCodium:https://github.com/DetachHead/basedpyright They have documentation that includes VSCodium so I would assume it works for code-server as well.

https://docs.basedpyright.com/latest/installation/ides/#__tabbed_1_2

Replies: 3 comments 6 replies

Comment options

Glad to hear you are having a good experience with Coder!

Hopefully someone who has worked with Python and code-server can chime in; from what I have heard some folks usehttps://github.com/pappasam/jedi-language-server but I am not sure how it compares to Pylance.

You must be logged in to vote
0 replies
Comment options

@code-asher Jedi language server is available in the ms-python extension, but it doesn't seem to provide the semantic token highlighting capability that Pylance does. I'm concerned that there just isn't an answer for this in code-server for Python.

You must be logged in to vote
6 replies
@code-asher
Comment options

Ahhh I see, that is unfortunate. Yeah it sounds like there is no open source version that can be used with code-server. 😞

@code-asher
Comment options

This is not a solution, but I will drop this link just in case, since VSCodium folks are having the same issue:VSCodium/vscodium#1556

Also I read somewhere that Pyright supposedly gave semantic token highlighting but I am not sure that is actually true. I think Pylance uses Pyright or something like that, but Pyright is available on Open VSX.

@Kile
Comment options

Hi@code-asher I am facing the same problem. Switching to Jedi in the ms Python extension also does not work. Installing a fork of that extension through your extension browser now does work with Jedi but fails on bigger files and is slow even on smaller ones (maybe my machine isn't super powerful but it should be decent).

VSCodium workarounds exist in the issue you mentioned but are just slightly too different for me to know where to start. Could you link me to or write a guide on this? it is a pretty major turnoff for me to use code-server.

@code-asher
Comment options

Unfortunately I have no experience with Jedi or the Python extensions myself and am not aware of any guides. It sounds like Jedi might be buggy so you may want to report that to them.

Does this extension look like it would help at all? I saw it linked while looking at Python issues on VSCodium:https://github.com/DetachHead/basedpyright They have documentation that includes VSCodium so I would assume it works for code-server as well.

https://docs.basedpyright.com/latest/installation/ides/#__tabbed_1_2

Answer selected bycode-asher
@Kile
Comment options

Oh very cool thanks I will try that out!!!

@Kile
Comment options

That works!!! Thanks a ton, this is such an awesome project!!!

Comment options

Related:

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
4 participants
@shinyshoes404@benz0li@code-asher@Kile

[8]ページ先頭

©2009-2025 Movatter.jp