mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02:00
feat(snakemake): update highlights and indents
This commit is contained in:
parent
e28614cb1a
commit
88aad97312
2 changed files with 23 additions and 10 deletions
|
@ -13,10 +13,9 @@
|
|||
name: _ @keyword))
|
||||
|
||||
; Subordinate directives (eg. input, output)
|
||||
(_
|
||||
body: (_
|
||||
(directive
|
||||
name: _ @label)))
|
||||
body: (_
|
||||
(directive
|
||||
name: _ @label))
|
||||
|
||||
; rule/module/checkpoint names
|
||||
(rule_definition
|
||||
|
@ -30,11 +29,14 @@
|
|||
|
||||
; Rule imports
|
||||
(rule_import
|
||||
"use" @keyword.import
|
||||
"rule" @keyword.import
|
||||
"from" @keyword.import
|
||||
"as"? @keyword.import
|
||||
"with"? @keyword.import)
|
||||
[
|
||||
"use"
|
||||
"rule"
|
||||
"from"
|
||||
"exclude"
|
||||
"as"
|
||||
"with"
|
||||
] @keyword.import)
|
||||
|
||||
; Rule inheritance
|
||||
(rule_inheritance
|
||||
|
@ -44,7 +46,9 @@
|
|||
|
||||
; Wildcard names
|
||||
(wildcard
|
||||
(identifier) @variable
|
||||
(identifier) @variable)
|
||||
|
||||
(wildcard
|
||||
(flag) @variable.parameter.builtin)
|
||||
|
||||
; builtin variables
|
||||
|
|
|
@ -9,8 +9,17 @@
|
|||
((rule_inheritance) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
((rule_import
|
||||
"with"
|
||||
":") @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
((module_definition) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
((directive) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
; end indentation after last parameter node (no following ',')
|
||||
(directive_parameters
|
||||
(_) @indent.end .)
|
||||
|
|
Loading…
Reference in a new issue