aboutsummaryrefslogtreecommitdiff
path: root/vim-snug/syntax/snug.vim
blob: 0353f6397d5e3f76242eea52d78c211aa0a258e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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