blob: 3cfb47fbeea9ddc1dcaf1ba8a54f20d84da81b6a [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:
Yinzuo Jiang700cf8c2024-07-14 17:02:33 +02007" 2023 Nov 24 - Add end-of-line strings (Samuel Hym)
Bram Moolenaar790c18b2019-07-04 17:22:06 +02008" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes)
9" 2018 May 8 - Check current_syntax (Kawahara Satoru)
10" 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal)
11" 2017 Sep 6 - Initial version (Etienne Millon)
12
13if exists("b:current_syntax")
14 finish
15endif
16
17set syntax=lisp
18syn case match
19
20" The syn-iskeyword setting lacks #,? from the iskeyword setting here.
21" Clearing it avoids maintaining keyword characters in multiple places.
22syn iskeyword clear
23
24syn keyword lispDecl jbuild_version library executable executables rule ocamllex ocamlyacc menhir alias install
25
26syn keyword lispKey name public_name synopsis modules libraries wrapped
27syn keyword lispKey preprocess preprocessor_deps optional c_names cxx_names
28syn keyword lispKey install_c_headers modes no_dynlink self_build_stubs_archive
29syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags
30syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps
31syn keyword lispKey library_flags c_flags c_library_flags kind package action
32syn keyword lispKey deps targets locks fallback
Bram Moolenaar7e6a5152021-01-02 16:39:53 +010033syn keyword lispKey inline_tests tests test names
Bram Moolenaar790c18b2019-07-04 17:22:06 +020034
35syn keyword lispAtom true false
36
37syn keyword lispFunc cat chdir copy# diff? echo run setenv
38syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
39syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
40syn keyword lispFunc write-file system bash
41
Yinzuo Jiang700cf8c2024-07-14 17:02:33 +020042syn region lispString start=+"\\[>|]+ end=+$+ contains=@Spell
43
Bram Moolenaar790c18b2019-07-04 17:22:06 +020044syn cluster lispBaseListCluster add=duneVar
45syn match duneVar '\${[@<^]}' containedin=lispSymbol
46syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
47
48hi def link duneVar Identifier
49
50let b:current_syntax = "dune"