From 35f46db49fbd2312e5d0320abb23664039615e16 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Sat, 9 Mar 2019 02:14:30 +0300 Subject: [PATCH] Improved syntax highlighting for bibop recipies --- BLACKHOLE.sublime-color-scheme | 6 ++++++ bibop-recipe.sublime-syntax | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/BLACKHOLE.sublime-color-scheme b/BLACKHOLE.sublime-color-scheme index 78a7061..acb96eb 100644 --- a/BLACKHOLE.sublime-color-scheme +++ b/BLACKHOLE.sublime-color-scheme @@ -133,6 +133,12 @@ "foreground": "var(function-call)", "font_style": "bold" }, + { + "name": "Function tag", + "scope": "meta.function.tag", + "foreground": "var(function-call)", + "font_style": "" + }, { "name": "Invalid", "scope": "invalid", diff --git a/bibop-recipe.sublime-syntax b/bibop-recipe.sublime-syntax index 90f30de..b6ccace 100644 --- a/bibop-recipe.sublime-syntax +++ b/bibop-recipe.sublime-syntax @@ -11,6 +11,7 @@ contexts: - include: comments - include: strings - include: keywords + - include: commands - include: variables comments: @@ -55,10 +56,8 @@ contexts: pop: true keywords: - - match: '^(dir|require-root|unsafe-actions|fast-finish)' + - match: '^(dir|require-root|unsafe-actions|fast-finish|lock-workdir)' scope: keyword.other - - match: '^action' - scope: support.function - match: '\b(true|false|yes|no)\b' scope: constant.language - match: '\b([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?\d+)?\b' @@ -66,6 +65,13 @@ contexts: - match: '\b\d+\b' scope: constant.numeric.integer.decimal.bibop + commands: + - match: '^(command):*([a-z0-9]*)' + captures: + 0: support.function + 1: meta.function + 2: meta.function.tag + variables: - match: '^(var) +([\d\w\S]+)' captures: