feat(snakemake): update highlights and indents

This commit is contained in:
Oliver Thomas 2024-08-05 21:56:30 +02:00 committed by Christian Clason
parent e28614cb1a
commit 88aad97312
2 changed files with 23 additions and 10 deletions

View file

@ -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

View file

@ -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 .)