Open ntluong95 opened 4 days ago
Thanks for logging this, this is as a result of the token types from of the Jedi-based language server in use in Positron's Python LSP.
Is there anyway to use Pylang, which is much better?
@ntluong95 I can't find any info on a "Pylang" syntax highlighter. Do you mean Pylance?
Yes sorry I meant Pylance. Fortunately I found this one, which serve my need. Maybe something you can consider to integrate into Positron as I know Pylance is only for VSCode. Link: https://open-vsx.org/extension/detachhead/basedpyright
Yes sorry I meant Pylance. Fortunately I found this one, which serve my need. Maybe something you can consider to integrate into Positron as I know Pylance is only for VSCode. Link: https://open-vsx.org/extension/detachhead/basedpyright
Here is the result after installing the package. However, the Quarto
file could not display syntax highlighting for Python module. I think Positron should have more support for Quarto
extension since now the Jupyter Notebook is far more better
Thank you for pointing out basedpyright, we'll look into it!
Aside from the Quarto issue you mentioned, how well does basedpyright currently work in Positron? At the very least, we may be able to iron some of those issues so that users can choose alternative language servers – although it is worth noting that completions would no longer be aware of your session's variables and would not benefit from other Positron-specific language server features in future.
It works well, excepted that in the Outlines, you will see 2 language servers. I think if you can look at their code and cherry-pick the part that help to recognize Python module keywords, and also attach it to Quarto, the problem will be solved. Just my naive idea
Could you please share a screenshot of the 2 language servers in Outlines?
Attached is the screenshot
Currently, module keywords such as pandas, pd, etc. are not highlighted. See the example below
In Vscode![image](https://github.com/posit-dev/positron/assets/63569637/3fbb11a1-cbc7-46eb-b9a3-d99be00b5245)
In Positron![image](https://github.com/posit-dev/positron/assets/63569637/9f4ec2d7-0e85-4b34-904a-6d28c7c0b30c)