diff options
author | Camil Staps | 2023-02-02 14:39:41 +0100 |
---|---|---|
committer | Camil Staps | 2023-02-02 14:39:41 +0100 |
commit | c1c043ef9aab2cbb02f4eba46c15d2d1fbb87550 (patch) | |
tree | fcc742d10e3eadc656454e2f961b91f4060ba771 /vim-snug/syntax/snug.vim | |
parent | Implement basic uses of locals (diff) |
Add basic vim support
Diffstat (limited to 'vim-snug/syntax/snug.vim')
-rw-r--r-- | vim-snug/syntax/snug.vim | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vim-snug/syntax/snug.vim b/vim-snug/syntax/snug.vim new file mode 100644 index 0000000..0353f63 --- /dev/null +++ b/vim-snug/syntax/snug.vim @@ -0,0 +1,39 @@ +" Snug syntax file +" Language: Snug functional programing language +" Maintainer: Camil Staps <info@camilstaps.nl> +" License: This file is placed in the public domain. + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword snugKeyword case data fun type + +syn keyword snugTodo TODO FIXME XXX BUG NB contained containedin=snugComment + +syn match snugChar /'[^'\\]'/ display +syn match snugInt /\d\+/ display + +syn match snugDelimiter /\v[\[\]\(\):;=,]/ display + +syn match snugIdentifier /^[_a-zA-Z]\+/ display + +syn region snugComment start="(#" end="#)" contains=@Spell,snugComment display + +hi def link snugKeyword Keyword +hi def link snugChar Character +hi def link snugInt Number +hi def link snugDelimiter Delimiter +hi def link snugIdentifier Identifier +hi def link snugTodo Todo +hi def link snugComment Comment + +syntax sync ccomment snugComment + +let b:current_syntax = 'snug' + +let &cpo = s:cpo_save +unlet s:cpo_save |