blob: 754289fc146be96a0647bd03183a465b4ef70594 [file] [log] [blame]
Bram Moolenaar14b69452013-06-29 23:05:20 +02001" Vim Compiler File
Bram Moolenaar790c18b2019-07-04 17:22:06 +02002" Compiler: ocaml
3" Maintainer: Markus Mottl <markus.mottl@gmail.com>
Bram Moolenaar7e6a5152021-01-02 16:39:53 +01004" URL: https://github.com/ocaml/vim-ocaml
Bram Moolenaar790c18b2019-07-04 17:22:06 +02005" Last Change:
Doug Kearns408281e2024-04-04 22:00:58 +02006" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
Bram Moolenaar7e6a5152021-01-02 16:39:53 +01007" 2020 Mar 28 - Improved error format (Thomas Leonard)
Bram Moolenaar790c18b2019-07-04 17:22:06 +02008" 2017 Nov 26 - Improved error format (Markus Mottl)
9" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
Bram Moolenaar14b69452013-06-29 23:05:20 +020010"
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
Bram Moolenaar7e6a5152021-01-02 16:39:53 +010025
Bram Moolenaar14b69452013-06-29 23:05:20 +020026if exists("current_compiler")
27 finish
28endif
29let current_compiler = "ocaml"
30
31let s:cpo_save = &cpo
32set cpo&vim
33
34CompilerSet errorformat =
Bram Moolenaar7e6a5152021-01-02 16:39:53 +010035 \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
Bram Moolenaar14b69452013-06-29 23:05:20 +020036 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
Bram Moolenaar790c18b2019-07-04 17:22:06 +020037 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
Bram Moolenaar14b69452013-06-29 23:05:20 +020038 \%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',
Bram Moolenaar790c18b2019-07-04 17:22:06 +020048 \%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',
Bram Moolenaar14b69452013-06-29 23:05:20 +020054 \%DMaking\ %*\\a\ in\ %f
55
56let &cpo = s:cpo_save
57unlet s:cpo_save