xref: /vim-8.2.3635/runtime/syntax/dune.vim (revision 89a9c159)
1" Vim syntax file
2" Language:    Dune buildsystem
3" Maintainer:  Markus Mottl        <[email protected]>
4"              Anton Kochkov       <[email protected]>
5" URL:         https://github.com/ocaml/vim-ocaml
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
12if exists("b:current_syntax")
13    finish
14endif
15
16set syntax=lisp
17syn case match
18
19" The syn-iskeyword setting lacks #,? from the iskeyword setting here.
20" Clearing it avoids maintaining keyword characters in multiple places.
21syn iskeyword clear
22
23syn keyword lispDecl jbuild_version library executable executables rule ocamllex ocamlyacc menhir alias install
24
25syn keyword lispKey name public_name synopsis modules libraries wrapped
26syn keyword lispKey preprocess preprocessor_deps optional c_names cxx_names
27syn keyword lispKey install_c_headers modes no_dynlink self_build_stubs_archive
28syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags
29syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps
30syn keyword lispKey library_flags c_flags c_library_flags kind package action
31syn keyword lispKey deps targets locks fallback
32syn keyword lispKey inline_tests tests test names
33
34syn keyword lispAtom true false
35
36syn keyword lispFunc cat chdir copy# diff? echo run setenv
37syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
38syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
39syn keyword lispFunc write-file system bash
40
41syn cluster lispBaseListCluster add=duneVar
42syn match duneVar '\${[@<^]}' containedin=lispSymbol
43syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
44
45hi def link duneVar Identifier
46
47let b:current_syntax = "dune"
48