mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
python: Fix highlighting for forward references (#20766)
[PEP484](https://peps.python.org/pep-0484/) defines "Forward references" for undefined types. This PR treats such annotations as types rather than strings. Release Notes: - Added Python syntax highlighting for forward references.
This commit is contained in:
parent
1739de59d4
commit
b12a508ed9
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,12 @@
|
|||
(tuple (identifier) @type)
|
||||
)
|
||||
|
||||
; Forward references
|
||||
(type
|
||||
(string) @type
|
||||
)
|
||||
|
||||
|
||||
; Function calls
|
||||
|
||||
(decorator
|
||||
|
|
Loading…
Reference in a new issue