Commit: runtime(unison): update syntax from upstream repository

0 views
Skip to first unread message

Christian Brabandt

unread,
Oct 25, 2025, 9:30:15 AMOct 25
to vim...@googlegroups.com
runtime(unison): update syntax from upstream repository

Commit: https://github.com/vim/vim/commit/bbf4a10fe43a40f80b1d48bbb0c055c31a114125
Author: Anton Parkhomenko <mai...@chuwy.me>
Date: Sat Oct 25 03:39:08 2025 +0000

runtime(unison): update syntax from upstream repository

closes: https://github.com/vim/vim/issues/18623

Signed-off-by: Anton Parkhomenko <mai...@chuwy.me>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/unison.vim b/runtime/syntax/unison.vim
index fed755104..a1f8cb099 100644
--- a/runtime/syntax/unison.vim
+++ b/runtime/syntax/unison.vim
@@ -2,7 +2,7 @@
"
" Language: unison
" Maintainer: Anton Parkhomenko <an...@chuwy.me>
-" Last Change: Aug 7, 2023
+" Last Change: Oct 25, 2025
" Original Author: John Williams, Paul Chiusano and Rúnar Bjarnason

if exists("b:current_syntax")
@@ -23,7 +23,7 @@ syn match unisonSpecialCharError contained "\&\|'''\+"
syn region unisonString start=+"+ skip=+\\\|\"+ end=+"+ contains=unisonSpecialChar
syn match unisonCharacter "[^a-zA-Z0-9_']'\([^\]\|\[^']\+\|\'\)'"lc=1 contains=unisonSpecialChar,unisonSpecialCharError
syn match unisonCharacter "^'\([^\]\|\[^']\+\|\'\)'" contains=unisonSpecialChar,unisonSpecialCharError
-syn match unisonNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
+syn match unisonNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>\|\<0[bB][01]\+\>"
syn match unisonFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"

" Keyword definitions. These must be patterns instead of keywords
@@ -38,7 +38,8 @@ syn match unisonConditional "\<\(if\|else\|then\)\>"
syn match unisonBoolean "\<\(true\|false\)\>"

syn match unisonType "\<\C[A-Z][0-9A-Za-z_'!]*\>"
-syn match unisonName "\<\C[a-z_][0-9A-Za-z_'!]*\>"
+syn match unisonName "\<\C[a-z_][0-9A-Za-z_'!]*\>" contains=ALL
+syn match unisonDef "^\C[A-Za-z_][0-9A-Za-z_'!]*:"

" Comments
syn match unisonLineComment "---*\([^-!#$%&\*\+./<=>\?@\^|~].*\)\?$"
@@ -57,7 +58,7 @@ syn region unisonDocDirective contained matchgroup=unisonDocDirective start

syn match unisonDebug "\<\(todo\|bug\|Debug.trace\|Debug.evalToText\)\>"

-" things like
+" things like
" > my_func 1 3
" test> Function.tap.tests.t1 = check let
" use Nat == +
@@ -88,6 +89,7 @@ hi def link unisonImport Include
hi def link unisonLineComment Comment
hi def link unisonLink Type
hi def link unisonName Identifier
+hi def link unisonDef Typedef
hi def link unisonNumber Number
hi def link unisonOperator Operator
hi def link unisonSpecialChar SpecialChar
Reply all
Reply to author
Forward
0 new messages