fork/numbat
git clone https://git.julia.blue/fork/numbat
6572a27
v1.8.0
1" Numbat.vim - Vim syntax file for Numbat language 2 3if exists ( "b:current_syntax" ) 4finish 5endif 6 7" Numbat Keywords 8syn keyword numbatKeywords per to let fn dimension unit use long short both none assert assert_eq type if then else true false Bool String 9highlight default link numbatKeywords Keyword 10 11" Physical dimensions (every capitalized word) 12syn match numbatDimensions "\<\u\w * \> " 13highlight default link numbatDimensions Type 14 15" Variables and units (lowercase words) 16" syn match numbatIdentifier "\<\l\w*\>" 17" highlight default link numbatIdentifier Identifier 18 19" Comments 20syn match numbatComments "#. * " 21highlight default link numbatComments Comment 22 23" Digits/Numbers 24syn match numbatNumber '\v<0x [ 0-9a-fA-F ] +> ' 25syn match numbatNumber '\v<0o [ 0-7 ] +> ' 26syn match numbatNumber '\v<0b [ 01 ] +> ' 27syn match numbatNumber '\v< [ 0-9 ] +(_ [ 0-9 ] +) * ( [ eE ][ +- ] ? [ 0-9 ] +)?> ' 28syn match numbatNumber '\v<( [ 0-9 ] * \. [ 0-9 ] * | [ 0-9 ] * \. [ 0-9 ] +)( [ eE ][ +- ] ? [ 0-9 ] +)?> ' 29highlight default link numbatNumber Number 30 31" Operators 32syn match numbatOperators "->\| [ +*^=/\-:·×÷²³<> ] " 33highlight default link numbatOperators Operator 34 35" Unit decorators 36syn match numbatDecorator "@\w\+ " 37highlight default link numbatDecorator Constant 38 39" Special units 40syn match numbatSpecialUnits "[ \u00B0 ] "" degree symbol 41highlight default link numbatSpecialUnits SpecialChar 42 43" Strings 44syntax match numbatString /"\( [ ^" ] * \)" / 45highlight link numbatString String 46 47" Load the matchit.vim script for the "%" matching, if it's available 48if exists ( ":DoMatchIt" ) 49DoMatchIt 50endif 51 52setlocal comments = b:#,fb:- 53setlocal commentstring = #\ %s 54 55let b: current_syntax = "numbat"