summaryrefslogtreecommitdiff
path: root/snakemake-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'snakemake-mode.el')
-rw-r--r--snakemake-mode.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index 319a0d8..56052d1 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -70,10 +70,11 @@
;;; Regexp
(defconst snakemake-rule-or-subworkflow-re
- (rx (group symbol-start (or "rule" "subworkflow"))
- " "
- (group (one-or-more (or (syntax word) (syntax symbol))))
- ":")
+ (rx (or (and (group symbol-start (or "rule" "subworkflow"))
+ " "
+ (group (one-or-more (or (syntax word) (syntax symbol))))
+ ":")
+ (and (group symbol-start "rule") ":")))
"Regexp matching a rule or subworkflow.")
(defconst snakemake-rule-or-subworkflow-line-re
@@ -326,8 +327,10 @@ label."
;;; Mode
(defvar snakemake-font-lock-keywords
- `((,snakemake-rule-or-subworkflow-line-re (1 font-lock-keyword-face)
- (2 font-lock-function-name-face))
+ `((,snakemake-rule-or-subworkflow-line-re
+ (1 font-lock-keyword-face nil 'lax)
+ (2 font-lock-function-name-face nil 'lax)
+ (3 font-lock-keyword-face nil 'lax))
(,snakemake-toplevel-command-re 1 font-lock-keyword-face)
(,snakemake-builtin-function-re 1 font-lock-builtin-face)
(,snakemake-field-key-indented-re 1 font-lock-type-face)))