From c544e01b7d470d90cc1817f1d47126b5b082da65 Mon Sep 17 00:00:00 2001 From: Evan Relf Date: Sat, 28 Sep 2019 15:38:43 -0700 Subject: [PATCH] Add additional syntax highlighting for Haskell - Function names in type signatures are now highlighted - Quasiquotes are now highlighted --- rc/filetype/haskell.kak | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index 88b3ed299..38eb32dce 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -84,6 +84,12 @@ add-highlighter shared/haskell/code/ regex \b(forall)\b[^.\n]*?(\.) 1:keyword 2: add-highlighter shared/haskell/code/ regex \B'([^\\]|[\\]['"\w\d\\])' 0:string # this has to come after operators so '-' etc is correct +# matches function names in type signatures +add-highlighter shared/haskell/code/ regex ^\h*(?:(?:where|let|default)\h+)?([_a-z]['\w]*)\s+::\s 1:meta + +# matches quasiquotes +add-highlighter shared/haskell/quasiquote region \[\b[\w]['\w]*\| \|\] fill string + # Commands # ‾‾‾‾‾‾‾‾