blob: b4254057c0755eb36d5db71c5038d0b0a88a58e8 [file] [log] [blame]
Bram Moolenaar7e6a5152021-01-02 16:39:53 +01001" Vim syntax file
Bram Moolenaar790c18b2019-07-04 17:22:06 +02002" Language: Dune buildsystem
3" Maintainer: Markus Mottl <markus.mottl@gmail.com>
4" Anton Kochkov <anton.kochkov@gmail.com>
Bram Moolenaar7e6a5152021-01-02 16:39:53 +01005" URL: https://github.com/ocaml/vim-ocaml
Bram Moolenaar790c18b2019-07-04 17:22:06 +02006" 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
Bram Moolenaar7e6a5152021-01-02 16:39:53 +010032syn keyword lispKey inline_tests tests test names
Bram Moolenaar790c18b2019-07-04 17:22:06 +020033
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"