Support semanticTokens
Describe the bug After upgrading the extension to 2.8.6, the highlight (which means the color) of non-base packages disappeared.
To Reproduce Steps to reproduce the behavior:
- Upgrade vscode-R extension to 2.8.6
- Write a function like
dplyr::mutate() - See error
Can you fix this issue by yourself? (We appreciate the help)
No
Expected behavior The function should be highlighted (with color).
Screenshots
Environment (please complete the following information):
- OS: macOS
- VSCode Version: 1.100.3
- R Version: 4.4.3
- vscode-R version: 2.8.6
Additional context Seems this bug is caused by R-syntax extension, because when I downgraded the vscode-R extension to 2.8.5, the function highlight still not work.
By the way, is there anyway to highlight variables?
It is intentional to bring more consistency to other languages such as python.
Emmm, but no matter in the default theme (Dark+) in VSCode or the One Dark Pro theme, python always has function syntax highlight? Here is the screenshot:
Screenshot of Dark+ theme
Screenshot of One Dark Pro theme
Are you sure that you have the default python syntax definition?
This is my highlight under visual studio dark+ theme.
I just realized that your lightlight may be due to "Semantic highlighting" of the python language server, for example Pylance.
I just realized that your lightlight may be due to "Semantic highlighting" of the python language server, for example Pylance.
Yes! Sorry I am not familiar with these terminologies😢
The vanilla highlight is expected and working as intended. To provide better dynamic highlight support, languageserver needs to support semantic token.
@randy3k However, in fact, older versions supported function name and variable name highlighting。
I vote to reintroduce function highlighting. Guess I will be stuck with RStudio for now.