From c6906a65c411df66b98d28a92cecb53afab70464 Mon Sep 17 00:00:00 2001 From: sfja Date: Tue, 31 Dec 2024 00:24:22 +0100 Subject: [PATCH] pub, mod, anno syntax --- editors/vim/syntax/slige.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editors/vim/syntax/slige.vim b/editors/vim/syntax/slige.vim index c9d4df1..610364c 100644 --- a/editors/vim/syntax/slige.vim +++ b/editors/vim/syntax/slige.vim @@ -8,7 +8,7 @@ if exists("b:current_syntax") endif -syn keyword Keyword break return let fn loop if else struct import or and not while for in +syn keyword Keyword break return let fn loop if else struct import or and not while for in mod pub syn keyword Special null syn keyword Type int string bool syn keyword Boolean true false @@ -48,6 +48,7 @@ syn match Comment "//.*$" contains=Todo syn region Comment start=+/\*+ end=+\*/+ contains=Todo + syn match Identifier '[a-z_]\w*' syn match Type '[A-Z]\w*' @@ -57,4 +58,8 @@ syn match Function ' \zs[a-zA-Z_]\w*\ze\s\{-}<.\{-}>\s\{-}(.\{-})' syn region sligeBlock start="{" end="}" transparent fold +syn region sligeAnno start="#!\?\[" end="]" contains=Identifier,Type + +hi def link sligeAnno PreProc + let b:current_syntax = "slige"