python-ts-mode: Improve fontification
python--treesit-settings: Fontification based on selectors & code-conventions - Constructor: Fontified as type, not function-call. - Typed default parameters - Fontify kwargs in function calls as property-use. Differentiate from variable-use (passed in arguments)
This commit is contained in:
parent
00b8d11ac8
commit
39721a4d79
1 changed files with 6 additions and 1 deletions
|
|
@ -1237,6 +1237,7 @@ fontified."
|
||||||
(parameters (identifier) @font-lock-variable-name-face)
|
(parameters (identifier) @font-lock-variable-name-face)
|
||||||
(parameters (typed_parameter (identifier) @font-lock-variable-name-face))
|
(parameters (typed_parameter (identifier) @font-lock-variable-name-face))
|
||||||
(parameters (default_parameter name: (identifier) @font-lock-variable-name-face))
|
(parameters (default_parameter name: (identifier) @font-lock-variable-name-face))
|
||||||
|
(parameters (typed_default_parameter name: (identifier) @font-lock-variable-name-face))
|
||||||
(lambda_parameters (identifier) @font-lock-variable-name-face)
|
(lambda_parameters (identifier) @font-lock-variable-name-face)
|
||||||
(for_in_clause
|
(for_in_clause
|
||||||
left: (identifier) @font-lock-variable-name-face)
|
left: (identifier) @font-lock-variable-name-face)
|
||||||
|
|
@ -1267,7 +1268,11 @@ fontified."
|
||||||
|
|
||||||
:feature 'function
|
:feature 'function
|
||||||
:language 'python
|
:language 'python
|
||||||
'((call function: (identifier) @font-lock-function-call-face)
|
'(((call function: (identifier) @font-lock-type-face)
|
||||||
|
(:match "\\`[A-Z][A-Za-z0-9]+\\'" @font-lock-type-face))
|
||||||
|
(call function: (identifier) @font-lock-function-call-face)
|
||||||
|
(call arguments: (argument_list (keyword_argument
|
||||||
|
name: (identifier) @font-lock-property-name-face)))
|
||||||
(call function: (attribute
|
(call function: (attribute
|
||||||
attribute: (identifier) @font-lock-function-call-face)))
|
attribute: (identifier) @font-lock-function-call-face)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue