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 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
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 use https://github.com/pappasam/jedi-language-server but I am not sure how it compares to Pylance. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
Related: |
Beta Was this translation helpful? Give feedback.
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