Skip to content

Commit

Permalink
feat: Python semantic highlighting enhancement
Browse files Browse the repository at this point in the history
Add entries to "semanticTokenColors", which are related to Python.

Support Python function declaration.
  • Loading branch information
rennsax committed Feb 27, 2024
1 parent 6b357d5 commit 597f2dd
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions theme/cobalt2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
"foreground": "#ffc600"
},
"variable": "#fff",
// In JS/TS, variable declared with `const` is recognized as readonly
// Therefore, it's necessary to specify the language
"variable.readonly:python": {
"foreground": "#FF628C"
},
"*.decorator:python": {
"fontStyle": "italic bold"
},
"selfParameter:python": {
"foreground": "#fb94ff",
"fontStyle": "italic"
},
"clsParameter:python": {
"foreground": "#fb94ff",
"fontStyle": "italic"
},
"interface": {
// "foreground": "#ff0088",
"foreground": "#FF68B8",
Expand Down Expand Up @@ -621,9 +637,24 @@
"name": "[PYTHON] - Self Argument",
"scope": "variable.parameter.function.language.special.self.python",
"settings": {
"fontStyle": "italic",
"foreground": "#fb94ff"
}
},
{
"name": "[PYTHON] - Method Declaration",
"scope": "entity.name.function.decorator.python",
"settings": {
"fontStyle": "italic bold"
}
},
{
"name": "[PYTHON] - Declaration Leading Punctuation @",
"scope": "punctuation.definition.decorator.python",
"settings": {
"foreground": "#FF68B8",
}
},
{
"name": "[JSON] - Support",
"scope": "source.json support",
Expand Down

0 comments on commit 597f2dd

Please sign in to comment.