From 6bb61d385a42c2988e89b86156b257c7ed66c24a Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Fri, 10 Apr 2026 07:23:54 -0400 Subject: nvim: add microscript support --- .config/nvim/syntax/microscript.vim | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .config/nvim/syntax/microscript.vim (limited to '.config/nvim/syntax') diff --git a/.config/nvim/syntax/microscript.vim b/.config/nvim/syntax/microscript.vim new file mode 100644 index 0000000..e6b77f7 --- /dev/null +++ b/.config/nvim/syntax/microscript.vim @@ -0,0 +1,42 @@ +if exists("b:current_syntax") + finish +endif + +syn keyword usStatement break next ret +syn keyword usStructure let global +syn keyword usLiteral true false zilch nada +syn keyword usConditional else elseif +syn keyword usOperator and or +syn keyword usTodo TODO FIXME HACK XXX + +syn region usIfEnd transparent matchgroup=usConditional start="\" end="\" contains=TOP +syn region usRepeatEnd transparent matchgroup=usRepeat start="\" end="\" contains=TOP +syn region usDoEnd transparent matchgroup=usStatement start="\" end="\" contains=TOP +syn region usFunEnd transparent matchgroup=usStructure start="\" end="\" contains=TOP +syn region usString start=/"/ end=/"/ contains=usSpecial +syn region usString start=/'/ end=/'/ contains=usSpecial + +syn match usFunction /[a-zA-Z_][a-zA-Z0-9_:]*\ze(/ +syn match usLabel /<[a-zA-Z_][a-zA-Z0-9_:]*>$/ +syn match usSpecial contained /\\[\\"'tnr]/ +syn match usComment /\#.*/ contains=usTodo +syn match usNumber /\<\d\+\>/ +syn match usNumber /\<\d\+\.\d*/ +syn match usOperator /=|\+=|-=|\*=|\/=|%=||\+|-|\*|\/|%|<|>|<=|>=|==|!=|!|\.|\.\./ + +hi def link usStructure Structure +hi def link usFunction Function +hi def link usStatement Statement +hi def link usLabel Label +hi def link usConditional Conditional +hi def link usRepeat Repeat +hi def link usModifier StorageClass +hi def link usString String +hi def link usSpecial Special +hi def link usOperator Operator +hi def link usNumber Constant +hi def link usLiteral Constant +hi def link usComment Comment +hi def link usTodo Todo + +let b:current_syntax = 'microscript' -- cgit v1.3-2-g0d8e