mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02:00
feat(perl): update highlights and folds
This commit is contained in:
parent
88aad97312
commit
3e0feeb062
2 changed files with 35 additions and 3 deletions
|
@ -2,20 +2,31 @@
|
|||
|
||||
(pod) @fold
|
||||
|
||||
; fold the block-typed package statements only
|
||||
; fold the block-typed package and class statements only
|
||||
(package_statement
|
||||
(block)) @fold
|
||||
|
||||
(class_statement
|
||||
(block)) @fold
|
||||
|
||||
[
|
||||
(subroutine_declaration_statement)
|
||||
(method_declaration_statement)
|
||||
(conditional_statement)
|
||||
(loop_statement)
|
||||
(for_statement)
|
||||
(cstyle_for_statement)
|
||||
(block_statement)
|
||||
(defer_statement)
|
||||
(phaser_statement)
|
||||
] @fold
|
||||
|
||||
(try_statement
|
||||
(block) @fold)
|
||||
|
||||
(eval_expression
|
||||
(block) @fold)
|
||||
|
||||
(anonymous_subroutine_expression) @fold
|
||||
|
||||
; perhaps folks want to fold these too?
|
||||
|
|
|
@ -32,9 +32,18 @@
|
|||
("continue" @keyword.repeat
|
||||
(block))
|
||||
|
||||
[
|
||||
"try"
|
||||
"catch"
|
||||
"finally"
|
||||
] @keyword.exception
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
"sub" @keyword.function
|
||||
[
|
||||
"sub"
|
||||
"method"
|
||||
] @keyword.function
|
||||
|
||||
[
|
||||
"map"
|
||||
|
@ -42,14 +51,20 @@
|
|||
"sort"
|
||||
] @function.builtin
|
||||
|
||||
"package" @keyword.import
|
||||
[
|
||||
"package"
|
||||
"class"
|
||||
] @keyword.import
|
||||
|
||||
[
|
||||
"defer"
|
||||
"do"
|
||||
"eval"
|
||||
"my"
|
||||
"our"
|
||||
"local"
|
||||
"state"
|
||||
"field"
|
||||
"last"
|
||||
"next"
|
||||
"redo"
|
||||
|
@ -129,12 +144,18 @@
|
|||
(package_statement
|
||||
(package) @type)
|
||||
|
||||
(class_statement
|
||||
(package) @type)
|
||||
|
||||
(require_expression
|
||||
(bareword) @type)
|
||||
|
||||
(subroutine_declaration_statement
|
||||
name: (bareword) @function)
|
||||
|
||||
(method_declaration_statement
|
||||
name: (bareword) @function)
|
||||
|
||||
(attribute_name) @attribute
|
||||
|
||||
(attribute_value) @string
|
||||
|
|
Loading…
Reference in a new issue