22"
33" Language: unison
44" Maintainer: Anton Parkhomenko <anton@chuwy.me>
5- " Last Change: Aug 7, 2023
5+ " Last Change: Oct 25, 2025
66" Original Author: John Williams, Paul Chiusano and Rúnar Bjarnason
77
88if exists (" b:current_syntax" )
@@ -23,7 +23,7 @@ syn match unisonSpecialCharError contained "\\&\|'''\+"
2323syn region unisonString start =+ "+ skip =+ \\\\\|\\ "+ end =+ "+ contains =unisonSpecialChar
2424syn match unisonCharacter " [^a-zA-Z0-9_']'\( [^\\ ]\|\\ [^']\+\|\\ '\) '" lc =1 contains =unisonSpecialChar,unisonSpecialCharError
2525syn match unisonCharacter " ^'\( [^\\ ]\|\\ [^']\+\|\\ '\) '" contains =unisonSpecialChar,unisonSpecialCharError
26- syn match unisonNumber " \< [0-9]\+\>\|\< 0[xX][0-9a-fA-F]\+\>\|\< 0[oO][0-7]\+\> "
26+ syn match unisonNumber " \< [0-9]\+\>\|\< 0[xX][0-9a-fA-F]\+\>\|\< 0[oO][0-7]\+\>\|\< 0[bB][01] \+\> "
2727syn match unisonFloat " \< [0-9]\+\. [0-9]\+\( [eE][-+]\= [0-9]\+\)\=\> "
2828
2929" Keyword definitions. These must be patterns instead of keywords
@@ -38,7 +38,8 @@ syn match unisonConditional "\<\(if\|else\|then\)\>"
3838syn match unisonBoolean " \<\( true\| false\)\> "
3939
4040syn match unisonType " \<\C [A-Z][0-9A-Za-z_'!]*\> "
41- syn match unisonName " \<\C [a-z_][0-9A-Za-z_'!]*\> "
41+ syn match unisonName " \<\C [a-z_][0-9A-Za-z_'!]*\> " contains =ALL
42+ syn match unisonDef " ^\C [A-Za-z_][0-9A-Za-z_'!]*:"
4243
4344" Comments
4445syn match unisonLineComment " ---*\( [^-!#$%&\*\+ ./<=>\? @\\ ^|~].*\)\? $"
@@ -57,7 +58,7 @@ syn region unisonDocDirective contained matchgroup=unisonDocDirective start
5758
5859syn match unisonDebug " \<\( todo\| bug\| Debug.trace\| Debug.evalToText\)\> "
5960
60- " things like
61+ " things like
6162" > my_func 1 3
6263" test> Function.tap.tests.t1 = check let
6364" use Nat == +
@@ -88,6 +89,7 @@ hi def link unisonImport Include
8889hi def link unisonLineComment Comment
8990hi def link unisonLink Type
9091hi def link unisonName Identifier
92+ hi def link unisonDef Typedef
9193hi def link unisonNumber Number
9294hi def link unisonOperator Operator
9395hi def link unisonSpecialChar SpecialChar
0 commit comments