From 7c455db52e3e90374299a9012048e974363f3bee Mon Sep 17 00:00:00 2001 From: lePerdu Date: Sun, 10 Nov 2019 18:12:45 -0500 Subject: [PATCH] Properly highlight Elm operators - Highlight `=` and `|` as keywords (like `->` and `:`) - Highlight custom operators (I guess they aren't really custom as of Elm 0.19 but there are still a bunch "built in"). --- rc/filetype/elm.kak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rc/filetype/elm.kak b/rc/filetype/elm.kak index 9f44c227..330f3b75 100644 --- a/rc/filetype/elm.kak +++ b/rc/filetype/elm.kak @@ -46,9 +46,10 @@ add-highlighter shared/elm/code/ regex \b([A-Z]+[^\s]*)\b add-highlighter shared/elm/code/ regex \b([a-z]+[^\s]*)\b 0:variable add-highlighter shared/elm/code/ regex \b(^[a-z]+[^\s]*)\b 0:function add-highlighter shared/elm/code/ regex "-?\b[0-9]*\.?[0-9]+" 0:value -add-highlighter shared/elm/code/ regex \B(\+|\+\+|\*|/|//|-|=|==|&&|\|\||<\||\|>)\B 0:operator +add-highlighter shared/elm/code/ regex \B[+-<>!@#$%^&*=:/\\|]+\B 0:operator add-highlighter shared/elm/code/ regex \b(import|exposing|as|module|where)\b 0:meta -add-highlighter shared/elm/code/ regex (\b(type|alias|if|then|else|case|of|let|in|infix|_)\b)|(\B(->|:)\B) 0:keyword +add-highlighter shared/elm/code/ regex \b(type|alias|if|then|else|case|of|let|in|infix|_)\b) 0:keyword +add-highlighter shared/elm/code/ regex (?!@#$%^&*=:/\\|])(->|:|=|\|)(?![+-<>!@#$%^&*=:/\\|]) 0:keyword # Commands # ‾‾‾‾‾‾‾‾