codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Gleam3" Maintainer: Kirill Morozov <kirill@robotix.pro>4" Based On: https://github.com/gleam-lang/gleam.vim5" Last Change: 2025 Apr 206" 2025 May 15 Add @Spell clusters #173247 8if exists("b:current_syntax")9 finish10endif11let b:current_syntax = "gleam"12 13syntax case match14 15" Keywords16syntax keyword gleamConditional case if17syntax keyword gleamConstant const18syntax keyword gleamDebug echo19syntax keyword gleamException panic assert todo20syntax keyword gleamInclude import21syntax keyword gleamKeyword as let use22syntax keyword gleamStorageClass pub opaque23syntax keyword gleamType type24 25" Number26"" Int27syntax match gleamNumber "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\>"28 29"" Binary30syntax match gleamNumber "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+\>"31 32"" Octet33syntax match gleamNumber "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+\>"34 35"" Hexadecimal36syntax match gleamNumber "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+\>"37 38"" Float39syntax match gleamFloat "\(0*[1-9][0-9_]*\|0\)\.\(0*[1-9][0-9_]*\|0\)\(e-\=0*[1-9][0-9_]*\)\="40 41" String42syntax region gleamString start=/"/ end=/"/ contains=gleamSpecial,@Spell43syntax match gleamSpecial '\\.' contained44 45" Operators46"" Basic47syntax match gleamOperator "[-+/*]\.\=\|[%=]"48 49"" Arrows + Pipeline50syntax match gleamOperator "<-\|[-|]>"51 52"" Bool53syntax match gleamOperator "&&\|||"54 55"" Comparison56syntax match gleamOperator "[<>]=\=\.\=\|[=!]="57 58"" Misc59syntax match gleamOperator "\.\.\|<>\||"60 61" Type62syntax match gleamIdentifier "\<[A-Z][a-zA-Z0-9]*\>" contains=@NoSpell63 64" Attribute65syntax match gleamPreProc "@[a-z][a-z_]*" contains=@NoSpell66 67" Function definition68syntax keyword gleamKeyword fn nextgroup=gleamFunction skipwhite skipempty69syntax match gleamFunction "[a-z][a-z0-9_]*\ze\s*(" skipwhite skipnl contains=@NoSpell70 71" Comments72syntax region gleamComment start="//" end="$" contains=gleamTodo,@Spell73syntax region gleamSpecialComment start="///" end="$" contains=@Spell74syntax region gleamSpecialComment start="////" end="$" contains=@Spell75syntax keyword gleamTodo contained TODO FIXME XXX NB NOTE76 77" Highlight groups78highlight link gleamComment Comment79highlight link gleamConditional Conditional80highlight link gleamConstant Constant81highlight link gleamDebug Debug82highlight link gleamException Exception83highlight link gleamFloat Float84highlight link gleamFunction Function85highlight link gleamIdentifier Identifier86highlight link gleamInclude Include87highlight link gleamKeyword Keyword88highlight link gleamNumber Number89highlight link gleamOperator Operator90highlight link gleamPreProc PreProc91highlight link gleamSpecial Special92highlight link gleamSpecialComment SpecialComment93highlight link gleamStorageClass StorageClass94highlight link gleamString String95highlight link gleamTodo Todo96highlight link gleamType Type97 98" vim: sw=2 sts=2 et99 