23466
|
1 " Vim syntax file
|
|
2 " Language: OPAM - OCaml package manager
|
|
3 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
|
4 " URL: https://github.com/ocaml/vim-ocaml
|
|
5 " Last Change:
|
|
6 " 2020 Dec 31 - Added header (Markus Mottl)
|
|
7
|
|
8 if exists("b:current_syntax")
|
|
9 finish
|
|
10 endif
|
|
11
|
|
12 " need %{vars}%
|
|
13 " env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
|
|
14 syn keyword opamKeyword1 remove depends pin-depends depopts conflicts env packages patches version maintainer tags license homepage authors doc install author available name depexts substs synopsis description
|
|
15 syn match opamKeyword2 "\v(bug-reports|post-messages|ocaml-version|opam-version|dev-repo|build-test|build-doc|build)"
|
|
16
|
|
17 syn keyword opamTodo FIXME NOTE NOTES TODO XXX contained
|
|
18 syn match opamComment "#.*$" contains=opamTodo,@Spell
|
|
19 syn match opamOperator ">\|<\|=\|<=\|>="
|
|
20
|
|
21 syn region opamInterpolate start=/%{/ end=/}%/ contained
|
|
22 syn region opamString start=/"/ end=/"/ contains=opamInterpolate
|
|
23 syn region opamSeq start=/\[/ end=/\]/ contains=ALLBUT,opamKeyword1,opamKeyword2
|
|
24 syn region opamExp start=/{/ end=/}/ contains=ALLBUT,opamKeyword1,opamKeyword2
|
|
25
|
|
26 hi link opamKeyword1 Keyword
|
|
27 hi link opamKeyword2 Keyword
|
|
28
|
|
29 hi link opamString String
|
|
30 hi link opamExp Function
|
|
31 hi link opamSeq Statement
|
|
32 hi link opamOperator Operator
|
|
33 hi link opamComment Comment
|
|
34 hi link opamInterpolate Identifier
|
|
35
|
|
36 let b:current_syntax = "opam"
|
|
37
|
|
38 " vim: ts=2 sw=2
|