23466
|
1 " Vim syntax file
|
17261
|
2 " Language: Dune buildsystem
|
|
3 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
|
4 " Anton Kochkov <anton.kochkov@gmail.com>
|
23466
|
5 " URL: https://github.com/ocaml/vim-ocaml
|
17261
|
6 " Last Change:
|
|
7 " 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes)
|
|
8 " 2018 May 8 - Check current_syntax (Kawahara Satoru)
|
|
9 " 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal)
|
|
10 " 2017 Sep 6 - Initial version (Etienne Millon)
|
|
11
|
|
12 if exists("b:current_syntax")
|
|
13 finish
|
|
14 endif
|
|
15
|
|
16 set syntax=lisp
|
|
17 syn case match
|
|
18
|
|
19 " The syn-iskeyword setting lacks #,? from the iskeyword setting here.
|
|
20 " Clearing it avoids maintaining keyword characters in multiple places.
|
|
21 syn iskeyword clear
|
|
22
|
|
23 syn keyword lispDecl jbuild_version library executable executables rule ocamllex ocamlyacc menhir alias install
|
|
24
|
|
25 syn keyword lispKey name public_name synopsis modules libraries wrapped
|
|
26 syn keyword lispKey preprocess preprocessor_deps optional c_names cxx_names
|
|
27 syn keyword lispKey install_c_headers modes no_dynlink self_build_stubs_archive
|
|
28 syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags
|
|
29 syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps
|
|
30 syn keyword lispKey library_flags c_flags c_library_flags kind package action
|
|
31 syn keyword lispKey deps targets locks fallback
|
23466
|
32 syn keyword lispKey inline_tests tests test names
|
17261
|
33
|
|
34 syn keyword lispAtom true false
|
|
35
|
|
36 syn keyword lispFunc cat chdir copy# diff? echo run setenv
|
|
37 syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
|
|
38 syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
|
|
39 syn keyword lispFunc write-file system bash
|
|
40
|
|
41 syn cluster lispBaseListCluster add=duneVar
|
|
42 syn match duneVar '\${[@<^]}' containedin=lispSymbol
|
|
43 syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
|
|
44
|
|
45 hi def link duneVar Identifier
|
|
46
|
|
47 let b:current_syntax = "dune"
|