]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2258: not all OCaml related files are detected v8.2.2258
authorBram Moolenaar <Bram@vim.org>
Fri, 1 Jan 2021 12:54:00 +0000 (13:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 1 Jan 2021 12:54:00 +0000 (13:54 +0100)
Problem:    Not all OCaml related files are detected.
Solution:   Update OCaml file type detection.  (Markus Mottl, closes #7590)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 71ecd313f19b8d5b345f60827b321bb9ace00e74..d624e2b34bb92f9aa00d2947f1e5bcb395f2a591 100644 (file)
@@ -499,6 +499,9 @@ au BufNewFile,BufRead *.com                 call dist#ft#BindzoneCheck('dcl')
 " DOT
 au BufNewFile,BufRead *.dot,*.gv               setf dot
 
+" Dune
+au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune
+
 " Dylan - lid files
 au BufNewFile,BufRead *.lid                    setf dylanlid
 
@@ -1125,8 +1128,8 @@ au BufNewFile,BufRead *.nse                       setf lua
 " NSIS
 au BufNewFile,BufRead *.nsi,*.nsh              setf nsis
 
-" OCAML
-au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit        setf ocaml
+" OCaml
+au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
 
 " Occam
 au BufNewFile,BufRead *.occ                    setf occam
@@ -1134,6 +1137,9 @@ au BufNewFile,BufRead *.occ                       setf occam
 " Omnimark
 au BufNewFile,BufRead *.xom,*.xin              setf omnimark
 
+" OPAM
+au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam
+
 " OpenROAD
 au BufNewFile,BufRead *.or                     setf openroad
 
@@ -1547,6 +1553,9 @@ au BufNewFile,BufRead *.scm,*.ss,*.rkt            setf scheme
 " Screen RC
 au BufNewFile,BufRead .screenrc,screenrc       setf screen
 
+" Sexplib
+au BufNewFile,BufRead *.sexp setf sexplib
+
 " Simula
 au BufNewFile,BufRead *.sim                    setf simula
 
index 9bc06b3d09bef53689c2d1f5601dc26d1cf10285..ea2237a76ecd0288e3199919f6e573ab67fa6872 100644 (file)
@@ -153,6 +153,7 @@ let s:filename_checks = {
     \ 'dsl': ['file.dsl'],
     \ 'dtd': ['file.dtd'],
     \ 'dts': ['file.dts', 'file.dtsi'],
+    \ 'dune': ['jbuild', 'dune', 'dune-project', 'dune-workspace'],
     \ 'dylan': ['file.dylan'],
     \ 'dylanintr': ['file.intr'],
     \ 'dylanlid': ['file.lid'],
@@ -338,9 +339,10 @@ let s:filename_checks = {
     \ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
     \ 'nsis': ['file.nsi', 'file.nsh'],
     \ 'obj': ['file.obj'],
-    \ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit'],
+    \ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit', 'file.mlt', 'file.mlp', 'file.mlip', 'file.mli.cppo', 'file.ml.cppo'],
     \ 'occam': ['file.occ'],
     \ 'omnimark': ['file.xom', 'file.xin'],
+    \ 'opam': ['opam', 'file.opam', 'file.opam.template'],
     \ 'openroad': ['file.or'],
     \ 'ora': ['file.ora'],
     \ 'pamconf': ['/etc/pam.conf', '/etc/pam.d/file', 'any/etc/pam.conf', 'any/etc/pam.d/file'],
@@ -414,6 +416,7 @@ let s:filename_checks = {
     \ 'scheme': ['file.scm', 'file.ss', 'file.rkt'],
     \ 'scilab': ['file.sci', 'file.sce'],
     \ 'screen': ['.screenrc', 'screenrc'],
+    \ 'sexplib': ['file.sexp'],
     \ 'scss': ['file.scss'],
     \ 'sd': ['file.sd'],
     \ 'sdc': ['file.sdc'],
index f5d57e2877a8c72e99ae66950d47d69313ba010c..92d4573fe931eb82d60bc24b01ccead92defd44e 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2258,
 /**/
     2257,
 /**/