Compare commits

..

2 Commits

Author SHA1 Message Date
Adam Stankiewicz
f061eddb7c Update README.md
Some checks failed
Vim Polyglot CI / test (push) Has been cancelled
2025-08-27 19:10:22 +02:00
Haim
f5393cfee0 Update README.md (#861)
Some checks failed
Vim Polyglot CI / test (push) Has been cancelled
Fix parenthesis missing, thus logo was not showing up
2024-12-04 23:22:43 +01:00
2 changed files with 11 additions and 46 deletions

View File

@@ -1,8 +1,4 @@
This is my top-starred repository on Github, so I've decided to put this ad here:
If you work for big corp and seek consulting, please visit following repository: https://github.com/sheerun/consultation
![vim-polyglot](https://i.imgur.com/9RxQK6k.png
![vim-polyglot](https://i.imgur.com/9RxQK6k.png)
A collection of language packs for Vim.

View File

@@ -12,63 +12,32 @@ let b:current_syntax = "gleam"
" Keywords
syntax keyword gleamKeyword
\ import pub panic use
\ module import pub external
\ type let as if else todo const
\ case assert try opaque
\ case assert tuple try opaque
highlight link gleamKeyword Keyword
" Function definition
syntax keyword gleamDef fn nextgroup=gleamFunctionDef skipwhite skipempty
highlight link gleamDef Keyword
syntax match gleamFunctionDef "[a-z][a-z0-9_]*\ze\s*(" skipwhite skipnl
highlight link gleamFunctionDef Function
syntax match gleamFunctionDef "[a-z_-][0-9a-z_-]*" contained skipwhite skipnl
highlight link gleamFunctionDef Function
" Number
"" Int
syntax match gleamInt '\<\(0*[1-9][0-9_]*|0\)\>'
" Int
syntax match gleamInt '\<[0-9][0-9_]*\>'
highlight link gleamInt Number
"" Binary
syntax match gleamBinary '\<0[bB]\(0*1[01_]*\|0\)\>'
highlight link gleamBinary Number
"" Octet
syntax match gleamOctet '\<0[oO]\(0*[1-7][0-7_]*\|0\)\>'
highlight link gleamOctet Number
"" Hexadecimal
syntax match gleamHexa '\<0[xX]\(0*[1-9a-zA-Z][0-9a-zA-Z_]*\|0\)\>'
highlight link gleamHexa Number
"" Float
syntax match gleamFloat '\(0*[1-9][0-9_]*\|0\)\.\(0*[1-9][0-9_]*\|0\)\=\(e-\=0*[1-9][0-9_]*\)\='
" Float
syntax match gleamFloat '\<[0-9][0-9_]*\.[0-9_]*\>'
highlight link gleamFloat Float
" Operators
"" Basic
syntax match gleamOperator "[-+/*]\.\=\|[%=]"
highlight link gleamOperator Operator
"" Arrows + Pipeline
syntax match gleamOperator "<-\|[-|]>"
highlight link gleamOperator Operator
"" Bool
syntax match gleamOperator "&&\|||"
highlight link gleamOperator Operator
"" Comparison
syntax match gleamOperator "[<>]=\=\.\=\|[=!]="
highlight link gleamOperator Operator
"" Misc
syntax match gleamOperator "\.\.\|<>\||"
syntax match gleamOperator "\([-!#$%`&\*\+./<=>@\\^|~:]\|\<\>\)"
highlight link gleamOperator Operator
" Type
syntax match gleamType "\<[A-Z][a-zA-Z0-9]*\>"
syntax match gleamType "\([a-z]\)\@<![A-Z]\w*"
highlight link gleamType Identifier
" Comments
@@ -85,5 +54,5 @@ highlight link gleamString String
highlight link gleamStringModifier Special
" Attribute
syntax match gleamAttribute "@[a-z][a-z_]*"
syntax match gleamAttribute "#[a-z][a-z_]*"
highlight link gleamAttribute PreProc