Skip to content

Commit 549ca40

Browse files
committed
fix #12. VSCode python plugin don't identify DocString and Multi-line String
enhance magic function, exception, arguments colr highlighting add more test case on python
1 parent d885438 commit 549ca40

File tree

2 files changed

+382
-5
lines changed

2 files changed

+382
-5
lines changed

vscode/src/gapstyle.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ tokenColors:
290290
- name: Docstrings
291291
scope:
292292
- string.quoted.docstring.multi
293-
- string.quoted.docstring.multi.python punctuation.definition.string.begin
294-
- string.quoted.docstring.multi.python punctuation.definition.string.end
295-
- string.quoted.docstring.multi.python constant.character.escape
296293
settings:
297294
foreground: *DOC
298295

@@ -1455,15 +1452,31 @@ tokenColors:
14551452
foreground: *DECORATOR
14561453
fontStyle: regular
14571454

1455+
- name: Python Function Call
1456+
scope:
1457+
- meta.function-call.python support.type.python
1458+
settings:
1459+
foreground: *FUNCTION
1460+
14581461
- name: Python String Interpolation
14591462
scope:
14601463
- constant.character.format.placeholder.other.python
14611464
- storage.type.format.python
1462-
- storage.type.string.python
1465+
- storage.type.string.python # String formatting
14631466
settings:
14641467
foreground: *STRING_INTERPOLATION
14651468
fontStyle: regular
14661469

1470+
- name: Python Doc String
1471+
scope:
1472+
- string.quoted.docstring.multi.python punctuation.definition.string.begin
1473+
- string.quoted.docstring.multi.python punctuation.definition.string.end
1474+
- string.quoted.docstring.multi.python constant.character.escape
1475+
- string.quoted.docstring.multi.python
1476+
settings:
1477+
foreground: *STRING
1478+
fontStyle: regular
1479+
14671480
- name: Python Property
14681481
scope:
14691482
- meta.item-access.python
@@ -1473,12 +1486,33 @@ tokenColors:
14731486

14741487
- name: Python Keyword
14751488
scope:
1489+
- constant.language.python
14761490
- variable.language.special.self.python
14771491
- variable.parameter.function.language.special.self.python
1492+
- keyword.operator.logical
14781493
settings:
14791494
foreground: *KEYWORD
14801495
fontStyle: bold
14811496

1497+
- name: Python Arguments
1498+
scope:
1499+
- meta.function-call.arguments.python
1500+
settings:
1501+
foreground: *DEFAULT
1502+
1503+
- name: Python Exception
1504+
scope:
1505+
- support.type.exception.python
1506+
settings:
1507+
foreground: *CLASS
1508+
1509+
- name: Python Magic Function
1510+
scope:
1511+
- support.function.magic.python
1512+
settings:
1513+
foreground: *FUNCTION
1514+
fontStyle: bold italic
1515+
14821516
# =============================================================================
14831517
# Swift
14841518
# =============================================================================

0 commit comments

Comments
 (0)