diff --git a/rc/extra/tupfile.kak b/rc/extra/tupfile.kak index 77630c2ef..6d4d851e8 100644 --- a/rc/extra/tupfile.kak +++ b/rc/extra/tupfile.kak @@ -4,7 +4,7 @@ # Detection # ‾‾‾‾‾‾‾‾‾ -hook global BufCreate (.+/)?[Tt]upfile %{ +hook global BufCreate .*/?Tup(file|rules)(\.\w+)?$ %{ set-option buffer filetype tupfile } @@ -19,11 +19,12 @@ add-highlighter shared/tupfile/string fill string add-highlighter shared/tupfile/comment fill comment add-highlighter shared/tupfile/code regex "\%[fbBeoOdg]\b" 0:value -add-highlighter shared/tupfile/code regex "\$\([\w_]+\)" 0:value -add-highlighter shared/tupfile/code regex ":\s*(foreach)\b" 1:keyword -add-highlighter shared/tupfile/code regex "\.gitignore\b" 0:keyword -add-highlighter shared/tupfile/code regex "\b(ifn?eq|ifn?def|else|endif|error|include|include_rules|run|preload|export)\b" 0:keyword -add-highlighter shared/tupfile/code regex "\b(&?[\w_]+)\s*[:+]?=" 1:keyword +add-highlighter shared/tupfile/code regex "[$@]\([\w_]+\)" 0:value +add-highlighter shared/tupfile/code regex "^\h*:\s*(foreach)\b" 1:keyword +add-highlighter shared/tupfile/code regex "^\h*(\.gitignore)\b" 1:keyword +add-highlighter shared/tupfile/code regex "^\h*\b(ifn?eq|ifn?def|else|endif|error|include|include_rules|run|preload|export)\b" 0:keyword +add-highlighter shared/tupfile/code regex "^\h*\b(&?[\w_]+)\s*[:+]?=" 1:keyword +add-highlighter shared/tupfile/code regex "`[^`\n]+`" 0:meta # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾