From 2b2bb0ac8a5ce23b7dba23d103047160557de404 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Sat, 14 Apr 2018 21:32:33 +0500 Subject: [PATCH 1/6] feature/unicode-operators --- syntax/haskell.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 5a04b8a..b7ab5e9 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -18,14 +18,14 @@ endif syn spell notoplevel syn match haskellRecordField contained containedin=haskellBlock - \ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\_s\+::\_s" + \ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\_s\+\(::\|∷\)\_s" \ contains= \ haskellIdentifier, \ haskellOperators, \ haskellSeparator, \ haskellParens syn match haskellTypeSig - \ "^\s*\(where\s\+\|let\s\+\|default\s\+\)\?[_a-z][a-zA-Z0-9_']*#\?\(,\s*[_a-z][a-zA-Z0-9_']*#\?\)*\_s\+::\_s" + \ "^\s*\(where\s\+\|let\s\+\|default\s\+\)\?[_a-z][a-zA-Z0-9_']*#\?\(,\s*[_a-z][a-zA-Z0-9_']*#\?\)*\_s\+\(::\|∷\)\_s" \ contains= \ haskellWhere, \ haskellLet, @@ -42,7 +42,7 @@ syn match haskellDecl "\<\(type\|data\)\>\s\+\(\\)\?" syn keyword haskellDefault default syn keyword haskellImportKeywords import qualified safe as hiding contained syn keyword haskellForeignKeywords foreign export import ccall safe unsafe interruptible capi prim contained -syn region haskellForeignImport start="\" end="\_s\+::\s" keepend +syn region haskellForeignImport start="\" end="\_s\+\(::\|∷\)\s" keepend \ contains= \ haskellString, \ haskellOperators, @@ -70,7 +70,7 @@ syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contai syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP,@Spell syn keyword haskellInfix infix infixl infixr syn keyword haskellBottom undefined error -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.]\+\|\<_\>" +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷‣†‡∵∴¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↔⋄]\+\|\<_\>" syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained syn region haskellQuoted start="\<'\+" end="\>" From e1cbaf5b1750b36cb19b305474006b1097481027 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Mon, 4 Jun 2018 00:48:15 +0500 Subject: [PATCH 2/6] =?UTF-8?q?feature/unicode-operators:=20support=20(?= =?UTF-8?q?=C3=97)=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- syntax/haskell.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index b7ab5e9..931b805 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -70,7 +70,7 @@ syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contai syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP,@Spell syn keyword haskellInfix infix infixl infixr syn keyword haskellBottom undefined error -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷‣†‡∵∴¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↔⋄]\+\|\<_\>" +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↔⋄]\+\|\<_\>" syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained syn region haskellQuoted start="\<'\+" end="\>" From ce8668a03ef8e88b474a65f5fd77fe35e326f6a8 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Sun, 10 Jun 2018 00:30:46 +0500 Subject: [PATCH 3/6] feature/unicode-operators: added more operators --- syntax/haskell.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 931b805..3953df1 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -70,7 +70,7 @@ syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contai syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP,@Spell syn keyword haskellInfix infix infixl infixr syn keyword haskellBottom undefined error -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↔⋄]\+\|\<_\>" +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔▪□○⊙⊚◎◆◇⋄▲△▼▽▶▷◀◁]\+\|\<_\>" syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained syn region haskellQuoted start="\<'\+" end="\>" From 1f40ed68652ac60b7d0c9ce9b200f525a955a19a Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Sun, 19 Aug 2018 16:55:17 +0300 Subject: [PATCH 4/6] feature/unicode-operators: added all geometric symbols which are listed here: https://www.w3schools.com/charsets/ref_utf_geometric.asp --- syntax/haskell.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 3953df1..2d24729 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -70,7 +70,12 @@ syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contai syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP,@Spell syn keyword haskellInfix infix infixl infixr syn keyword haskellBottom undefined error -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔▪□○⊙⊚◎◆◇⋄▲△▼▽▶▷◀◁]\+\|\<_\>" + +" unicode geometric symbols are listed here: +" https://www.w3schools.com/charsets/ref_utf_geometric.asp +" ■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿ +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔⊙⊚⋄■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿]\+\|\<_\>" + syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained syn region haskellQuoted start="\<'\+" end="\>" From ec8108f5940eb3676af625d3f905e0c5f9795828 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Wed, 3 Jul 2019 17:08:39 +0300 Subject: [PATCH 5/6] feature/unicode-operators: added mathematical minus sign symbol --- syntax/haskell.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 2d24729..3ef9ac6 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -74,7 +74,7 @@ syn keyword haskellBottom undefined error " unicode geometric symbols are listed here: " https://www.w3schools.com/charsets/ref_utf_geometric.asp " ■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿ -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔⊙⊚⋄■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿]\+\|\<_\>" +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜−⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔⊙⊚⋄■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿]\+\|\<_\>" syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained From 993749404f58a3bd51a68d66f10b4c92a3ad6871 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Thu, 29 Oct 2020 05:18:29 +0200 Subject: [PATCH 6/6] feature/unicode-operators: Add more unicode arrow symbols --- syntax/haskell.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 3ef9ac6..47d37e4 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -74,7 +74,12 @@ syn keyword haskellBottom undefined error " unicode geometric symbols are listed here: " https://www.w3schools.com/charsets/ref_utf_geometric.asp " ■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿ -syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷→←⇒⇐∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜−⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛↕↔⇔⊙⊚⋄■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿]\+\|\<_\>" +" unicode arrows are listed here: +" https://en.wikipedia.org/wiki/Arrows_(Unicode_block) +" ←↑→↓↔↕↖↗↘↙↚↛↜↝↞↟↠↡↢↣↤↥↦↧↨↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛⇜⇝⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪⇫⇬⇭⇮⇯⇰⇱⇲⇳⇴⇵⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿ +" see also about unicode arrows: +" https://www.unicode.org/charts/PDF/U2190.pdf +syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.∷∀★¬∧∨≡≠≢≤≥∘•∙·∈∉∌∋⊥⧺⤚⤙⤛⤜−⋅÷×‣†‡∵∴∶¡¿‖⊳⊲⋈∖∆⊆⊇∪∩∅⊕⊛⊙⊚⋄■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿←↑→↓↔↕↖↗↘↙↚↛↜↝↞↟↠↡↢↣↤↥↦↧↨↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛⇜⇝⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪⇫⇬⇭⇮⇯⇰⇱⇲⇳⇴⇵⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿]\+\|\<_\>" syn match haskellQuote "\<'\+" contained syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained