From 3770baaab0ba6079c4a0ca4163b5fa229565999f Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 14 Sep 2020 16:04:09 -0500 Subject: [PATCH] fix justfile highlighter This fixes serveral shortcomings of the current implementation: - valid recipt definitions eg foo bar="quz": where previously interrupted by justfile/double_string and therefore they where not highlighted correctly - global variable assignments where not captured at all --- rc/filetype/just.kak | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/rc/filetype/just.kak b/rc/filetype/just.kak index d198d517..0974c9be 100644 --- a/rc/filetype/just.kak +++ b/rc/filetype/just.kak @@ -38,18 +38,23 @@ define-command -hidden just-indent-on-new-line %{ # ‾‾‾‾‾‾‾‾‾‾‾‾ add-highlighter shared/justfile regions + add-highlighter shared/justfile/content default-region group +add-highlighter shared/justfile/content/recipe regex '^@?([\w-]+)([^\n]*):(?!=)([^\n]*)' 1:function 2:meta 3:keyword +add-highlighter shared/justfile/content/assignments regex ^([\w-]+\h*:=\h*[^\n]*) 1:meta +add-highlighter shared/justfile/content/operator regex '((^@|:=|=|\+|\(|\)))' 1:operator +add-highlighter shared/justfile/content/strings regions +add-highlighter shared/justfile/content/strings/double region '"' (?