summaryrefslogtreecommitdiffstats
path: root/runtime/compiler/ocaml.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:18:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:18:03 +0000
commitafce081b90c1e2c50c3507758c7558a0dfa1f33e (patch)
tree3fb840f0bd9de41b463443ddf17131a0ad77f226 /runtime/compiler/ocaml.vim
parentInitial commit. (diff)
downloadvim-afce081b90c1e2c50c3507758c7558a0dfa1f33e.tar.xz
vim-afce081b90c1e2c50c3507758c7558a0dfa1f33e.zip
Adding upstream version 2:8.2.2434.upstream/2%8.2.2434upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/compiler/ocaml.vim')
-rw-r--r--runtime/compiler/ocaml.vim56
1 files changed, 56 insertions, 0 deletions
diff --git a/runtime/compiler/ocaml.vim b/runtime/compiler/ocaml.vim
new file mode 100644
index 0000000..faa8af1
--- /dev/null
+++ b/runtime/compiler/ocaml.vim
@@ -0,0 +1,56 @@
+" Vim Compiler File
+" Compiler: ocaml
+" Maintainer: Markus Mottl <markus.mottl@gmail.com>
+" URL: https://github.com/ocaml/vim-ocaml
+" Last Change:
+" 2020 Mar 28 - Improved error format (Thomas Leonard)
+" 2017 Nov 26 - Improved error format (Markus Mottl)
+" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
+"
+" Marc Weber's comments:
+" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
+" ocamake and whatnot. So which one to use?
+"
+" This error format was moved from ftplugin/ocaml.vim to this file,
+" because ftplugin is the wrong file to set an error format
+" and the error format itself is annoying because it joins many lines in this
+" error case:
+"
+" Error: The implementation foo.ml does not match the interface foo.cmi:
+" Modules do not match case.
+"
+" So having it here makes people opt-in
+
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "ocaml"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet errorformat =
+ \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
+ \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
+ \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
+ \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
+ \%+EReference\ to\ unbound\ regexp\ name\ %m,
+ \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
+ \%Wocamlyacc:\ w\ -\ %m,
+ \%-Zmake%.%#,
+ \%C%m,
+ \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
+ \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
+ \%D%*\\a:\ Entering\ directory\ `%f',
+ \%X%*\\a:\ Leaving\ directory\ `%f',
+ \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
+ \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
+ \%D%*\\a:\ Entering\ directory\ '%f',
+ \%X%*\\a:\ Leaving\ directory\ '%f',
+ \%DEntering\ directory\ '%f',
+ \%XLeaving\ directory\ '%f',
+ \%DMaking\ %*\\a\ in\ %f
+
+let &cpo = s:cpo_save
+unlet s:cpo_save