robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Christian Clasonvim-patch:408281e16a362b9d8dc87e

master
2.0 KiB57 linesraw
1" Vim Compiler File
2" Compiler:    ocaml
3" Maintainer:  Markus Mottl <markus.mottl@gmail.com>
4" URL:         https://github.com/ocaml/vim-ocaml
5" Last Change:
6"		2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
7"              2020 Mar 28 - Improved error format (Thomas Leonard)
8"              2017 Nov 26 - Improved error format (Markus Mottl)
9"              2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
10"
11" Marc Weber's comments:
12" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
13" ocamake and whatnot. So which one to use?
14"
15" This error format was moved from ftplugin/ocaml.vim to this file,
16" because ftplugin is the wrong file to set an error format
17" and the error format itself is annoying because it joins many lines in this
18" error case:
19"
20"    Error: The implementation foo.ml does not match the interface foo.cmi:
21"    Modules do not match case.
22"
23" So having it here makes people opt-in
24
25
26if exists("current_compiler")
27    finish
28endif
29let current_compiler = "ocaml"
30
31let s:cpo_save = &cpo
32set cpo&vim
33
34CompilerSet errorformat =
35      \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
36      \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
37      \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
38      \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
39      \%+EReference\ to\ unbound\ regexp\ name\ %m,
40      \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
41      \%Wocamlyacc:\ w\ -\ %m,
42      \%-Zmake%.%#,
43      \%C%m,
44      \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
45      \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
46      \%D%*\\a:\ Entering\ directory\ `%f',
47      \%X%*\\a:\ Leaving\ directory\ `%f',
48      \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
49      \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
50      \%D%*\\a:\ Entering\ directory\ '%f',
51      \%X%*\\a:\ Leaving\ directory\ '%f',
52      \%DEntering\ directory\ '%f',
53      \%XLeaving\ directory\ '%f',
54      \%DMaking\ %*\\a\ in\ %f
55
56let &cpo = s:cpo_save
57unlet s:cpo_save