Skip to content

Commit

Permalink
add patch for Python syntax to help improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall authored and sharkdp committed Aug 7, 2021
1 parent 8ecd23e commit 05c1196
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

## Bugfixes

- Python syntax highlighting no longer suffers from abysmal performance in specific scenarios. See #1688 (@keith-hall)

## Other

Expand Down
15 changes: 15 additions & 0 deletions assets/patches/Python.sublime-syntax.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git syntaxes/01_Packages/Python/Python.sublime-syntax syntaxes/01_Packages/Python/Python.sublime-syntax
index 2acd86d8..86257f7b 100644
--- syntaxes/01_Packages/Python/Python.sublime-syntax
+++ syntaxes/01_Packages/Python/Python.sublime-syntax
@@ -988,10 +988,6 @@ contexts:
- match: \}
scope: punctuation.section.mapping-or-set.end.python
set: after-expression
- - match: (?={{simple_expression}}:|\s*\*\*)
- set: inside-dictionary
- - match: (?={{simple_expression}}[,}]|\s*\*)
- set: inside-set
- match: ','
scope: punctuation.separator.set.python
set: inside-set

0 comments on commit 05c1196

Please sign in to comment.