feat: semantic highlighting
I would like to know if anything is planned for semantic highlighting.
It is a feature provided in basedpyright, pylance and even typescript language server that highlights based on the semantics, like known variables by the LSP are highlighted.
This has been very important in my workflow because I set syntax highlighting to very minimal and prefer to use mainly semantic highlighting. More colour in my code means more type-complete, making programming more fun kind of like painting.
As a reference this is what basedpyright looks like:
The var_outside_scope has a semantic highlight as well, it just happens to be white in this case. So the variable within and outside of function have different colours.
I appreciate your work!
Hi, thanks for reaching out. We do plan to support semantic syntax highlighting.
cc @kinto0
Possibly the same request as https://github.com/facebook/pyrefly/issues/218
Closing this to consolidate our tracking
Hi @kiyoon, which IDE are you using? @SamChou19815 added support for semantic highlighting which we have tested in VSCode and is available Pyrefly's latest release. If you get a chance to try it, we'd love to know what you think.
@lolpack Thank you! I'm using Neovim and I can see some colours, although not all of them :)
Specifically, the colours on the function call's keyword arguments are missing.
build_sql(
param1=value1,
param2=value2,
)
The param1 and param2 should be coloured. But I know you are still working on it 👍
@lolpack Thank you! I'm using Neovim and I can see some colours, although not all of them :)
Specifically, the colours on the function call's keyword arguments are missing.
build_sql( param1=value1, param2=value2, ) The
param1andparam2should be coloured. But I know you are still working on it 👍
done, will be out in next release. let us know if there are other important ones you are missing and want us to prioritize!