Highlight typing hints in a different color than ordinary code.
See original GitHub issueTyping hints are displayed in the same color as python variables and statements. That looks somewhat confusing and makes it harder to see at once where is a typing hint, where a variable name is defined and where is an actual code.
E.g., the line below up to ‘origin’ is in the same color.
remote: pygit2.Remote = gitrepo.remotes['origin']
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Semantic Highlighting for Type Hints · Issue #335 - GitHub
However it seems like type hints don't have any special semantic (usually ... and I'm wanted type hints to have a different color...
Read more >Syntax Highlight Guide | Visual Studio Code Extension API
Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords...
Read more >Semantic Code Highlighting - Visual Studio Magazine
Syntax-based coloring "can only highlight by what the code looks like, not by what the code means, since that requires wider knowledge," notes ......
Read more >Syntax highlighting - Wikipedia
Syntax highlighting is a feature of text editors that are used for programming, scripting, ... The feature displays text, especially source code, in...
Read more >Colors and fonts | IntelliJ IDEA Documentation - JetBrains
and select Restore Defaults. You cannot remove predefined color schemes. To define color and font settings, open the Editor | Color Scheme page ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll see what I can do to highlight type hints better. I guess the starting point would be to at least give them all a scope of their own like
meta.typehint.python
.It appears Github’s highlighting decided that everything that starts with a capital letter deserves that same color. I’m still inclined towards having separate scopes for typehints and for normal classes, so we can choose different colors.