From 63bbfc253be62c326bea3868668b6158ac749ea6 Mon Sep 17 00:00:00 2001 From: Evan Relf Date: Sun, 1 Dec 2019 23:58:43 -0800 Subject: [PATCH 1/5] Relocate Haskell quasiquote region highlighter --- rc/filetype/haskell.kak | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index c2d19340..309646e7 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -39,6 +39,7 @@ add-highlighter shared/haskell/macro region ^\h*?\K# add-highlighter shared/haskell/pragma region -recurse \{- \{-# '#-\}' fill meta add-highlighter shared/haskell/comment region -recurse \{- \{- -\} fill comment add-highlighter shared/haskell/line_comment region --(?:[^!#$%&*+./<>?@\\\^|~=]|$) $ fill comment +add-highlighter shared/haskell/quasiquote region \[\b[_a-z]['\w]*#?\| \|\] fill string add-highlighter shared/haskell/code/ regex (? Date: Sun, 1 Dec 2019 23:59:08 -0800 Subject: [PATCH 2/5] Highlight Haskell type and data `family` keyword --- rc/filetype/haskell.kak | 1 + 1 file changed, 1 insertion(+) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index 309646e7..82fba2c9 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -47,6 +47,7 @@ add-highlighter shared/haskell/code/ regex (? Date: Sun, 1 Dec 2019 23:59:48 -0800 Subject: [PATCH 3/5] Improve highlighting of Haskell function names --- rc/filetype/haskell.kak | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index 82fba2c9..7745384c 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -87,8 +87,7 @@ 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 - +add-highlighter shared/haskell/code/ regex ^\s*(?:where\s+|let\s+|default\s+)?([_a-z]['\w]*#?(?:,\s*[_a-z]['\w]*#?)*)\s+::\s 1:meta # matches deriving strategies add-highlighter shared/haskell/code/ regex \bderiving\s+\b(stock|newtype|anyclass|via)\b 1:keyword From 991ed97f4c26f6705b0a7ed82ebd4ffcdae44f77 Mon Sep 17 00:00:00 2001 From: Evan Relf Date: Thu, 12 Dec 2019 15:45:43 -0800 Subject: [PATCH 4/5] Fix incomplete highlighting of Haskell via keyword --- rc/filetype/haskell.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index 7745384c..4315d37e 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -91,7 +91,7 @@ add-highlighter shared/haskell/code/ regex ^\s*(?:where\s+|let\s+|default\s+)?([ # matches deriving strategies add-highlighter shared/haskell/code/ regex \bderiving\s+\b(stock|newtype|anyclass|via)\b 1:keyword -add-highlighter shared/haskell/code/ regex \bderiving\s+[^\s]+?\s+\b(via)\b 1:keyword +add-highlighter shared/haskell/code/ regex \bderiving\b\s+(?:[A-Z]['\w]+|\([',\w\s]+?\))\s+\b(via)\b 1:keyword # Commands # ‾‾‾‾‾‾‾‾ From 77ec8b70a8384afe7235fa80d4d4ffc411b2cf0c Mon Sep 17 00:00:00 2001 From: Evan Relf Date: Thu, 12 Dec 2019 16:00:50 -0800 Subject: [PATCH 5/5] Fix Haskell multi-line quasiquoter highlighting --- rc/filetype/haskell.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/haskell.kak b/rc/filetype/haskell.kak index 4315d37e..7d15014a 100644 --- a/rc/filetype/haskell.kak +++ b/rc/filetype/haskell.kak @@ -39,7 +39,7 @@ add-highlighter shared/haskell/macro region ^\h*?\K# add-highlighter shared/haskell/pragma region -recurse \{- \{-# '#-\}' fill meta add-highlighter shared/haskell/comment region -recurse \{- \{- -\} fill comment add-highlighter shared/haskell/line_comment region --(?:[^!#$%&*+./<>?@\\\^|~=]|$) $ fill comment -add-highlighter shared/haskell/quasiquote region \[\b[_a-z]['\w]*#?\| \|\] fill string +add-highlighter shared/haskell/quasiquote region \[\b[_a-z]['\w]*#?\| \|\] regex \[\b[_a-z]['\w]*#?\|(.*?)\|\] 1:string add-highlighter shared/haskell/code/ regex (?