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