From 88bb854f36b385e2b2217a25d416de8cf1eb5ef2 Mon Sep 17 00:00:00 2001 From: Caleb Heuer Date: Sat, 17 Dec 2022 00:10:08 -0700 Subject: [PATCH] Improve Go highlighting --- rc/filetype/go.kak | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rc/filetype/go.kak b/rc/filetype/go.kak index af5a7a86..194c51d7 100644 --- a/rc/filetype/go.kak +++ b/rc/filetype/go.kak @@ -50,7 +50,9 @@ add-highlighter shared/go/single_string region "'" (?|<|>=|<=|&|&&|\|\||!|<-|:=)" 1:operator evaluate-commands %sh{ # Grammar @@ -69,12 +71,11 @@ evaluate-commands %sh{ # Highlight keywords printf %s " - add-highlighter shared/go/code/ regex \b($(join "${keywords}" '|'))\b 0:keyword - add-highlighter shared/go/code/ regex \b($(join "${attributes}" '|'))\b 0:attribute - add-highlighter shared/go/code/ regex \b($(join "${types}" '|'))\b 0:type - add-highlighter shared/go/code/ regex \b($(join "${values}" '|'))\b 0:value - add-highlighter shared/go/code/ regex \b($(join "${functions}" '|'))\b 0:builtin - add-highlighter shared/go/code/ regex := 0:attribute + add-highlighter shared/go/code/keyword regex \b($(join "${keywords}" '|'))\b 0:keyword + add-highlighter shared/go/code/attribute regex \b($(join "${attributes}" '|'))\b 0:attribute + add-highlighter shared/go/code/type regex \b($(join "${types}" '|'))\b 0:type + add-highlighter shared/go/code/value regex \b($(join "${values}" '|'))\b 0:value + add-highlighter shared/go/code/builtin regex \b($(join "${functions}" '|'))\b 0:builtin " }