- Notifications
You must be signed in to change notification settings - Fork6.1k
Recommended Setup for Python in code-server without Pylance#6707
-
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 VS Code Desktop highlighting |
BetaWas this translation helpful?Give feedback.
All reactions
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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
@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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Ahhh I see, that is unfortunate. Yeah it sounds like there is no open source version that can be used with code-server. 😞 |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
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 |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
Oh very cool thanks I will try that out!!! |
BetaWas this translation helpful?Give feedback.
All reactions
-
That works!!! Thanks a ton, this is such an awesome project!!! |
BetaWas this translation helpful?Give feedback.
All reactions
🎉 1
-
Related: |
BetaWas this translation helpful?Give feedback.