Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve Python syntax highlighting (#25331)

chbk59a153b2e182
diff --git a/crates/languages/src/python/highlights.scm b/crates/languages/src/python/highlights.scm
index e3e38aafedf..a6c20cd6bc6 100644
--- a/crates/languages/src/python/highlights.scm
+++ b/crates/languages/src/python/highlights.scm
@@ -8,6 +8,7 @@
((identifier) @constant
(#match? @constant "^_*[A-Z][A-Z0-9_]*$"))
+(identifier) @variable
(attribute attribute: (identifier) @property)
(type (identifier) @type)
(generic_type (identifier) @type)
@@ -117,6 +118,12 @@
(#match? @variable.special "^self|cls$")
]
+[
+ "."
+ ","
+ ":"
+] @punctuation.delimiter
+
[
"("
")"
@@ -190,6 +197,7 @@
"&"
"%"
"%="
+ "@"
"^"
"+"
"->"