mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(python): add support for pattern matching
Fixes #2080 Depends on https://github.com/tree-sitter/tree-sitter-python/pull/140
This commit is contained in:
parent
542d098e14
commit
c4e3564ea3
4 changed files with 54 additions and 7 deletions
|
|
@ -230,7 +230,7 @@
|
|||
["from" "import"] @include
|
||||
(aliased_import "as" @include)
|
||||
|
||||
["if" "elif" "else"] @conditional
|
||||
["if" "elif" "else" "match" "case"] @conditional
|
||||
|
||||
["for" "while" "break" "continue"] @repeat
|
||||
|
||||
|
|
|
|||
|
|
@ -34,11 +34,6 @@
|
|||
(typed_default_parameter
|
||||
(identifier) @definition.parameter)
|
||||
|
||||
(with_statement
|
||||
(with_clause
|
||||
(with_item
|
||||
alias: (identifier) @definition.var)))
|
||||
|
||||
; *args parameter
|
||||
(parameters
|
||||
(list_splat_pattern
|
||||
|
|
@ -113,6 +108,8 @@
|
|||
(named_expression
|
||||
(identifier) @definition.var)
|
||||
|
||||
(as_pattern
|
||||
alias: (identifier) @definition.var)
|
||||
|
||||
;;; REFERENCES
|
||||
(identifier) @reference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue