Fix ocaml and dune ftdetect

This commit is contained in:
Adam Stankiewicz
2020-08-27 09:30:50 +02:00
parent f0d6ecff07
commit c1e1870a3d
3 changed files with 37 additions and 1 deletions

View File

@@ -97,7 +97,6 @@ if index(g:polyglot_disabled, 'c/c++') == -1
au BufNewFile,BufRead *.inl set ft=cpp
au BufNewFile,BufRead *.ino set ft=cpp
au BufNewFile,BufRead *.ipp set ft=cpp
au BufNewFile,BufRead *.re setf cpp
au BufNewFile,BufRead *.tcc set ft=cpp
au BufNewFile,BufRead *.tpp set ft=cpp
endif
@@ -652,6 +651,7 @@ if index(g:polyglot_disabled, 'ocaml') == -1
au BufNewFile,BufRead *.mlp set ft=ocaml
au BufNewFile,BufRead *.mlt set ft=ocaml
au BufNewFile,BufRead *.mly set ft=ocaml
au BufNewFile,BufRead {.,}ocamlinit set ft=ocaml
au BufNewFile,BufRead *.om set ft=omake
au BufNewFile,BufRead OMakefile set ft=omake
au BufNewFile,BufRead OMakeroot set ft=omake
@@ -660,6 +660,14 @@ if index(g:polyglot_disabled, 'ocaml') == -1
au BufNewFile,BufRead *.opam.template set ft=opam
au BufNewFile,BufRead opam set ft=opam
au BufNewFile,BufRead _oasis set ft=oasis
au BufNewFile,BufRead dune set ft=dune
au BufNewFile,BufRead dune-project set ft=dune
au BufNewFile,BufRead dune-workspace set ft=dune
au BufNewFile,BufRead jbuild set ft=dune
au BufNewFile,BufRead _tags set ft=ocamlbuild_tags
au BufNewFile,BufRead *.ocp set ft=ocpbuild
au BufNewFile,BufRead *.root set ft=ocpbuildroot
au BufNewFile,BufRead *.sexp set ft=sexplib
endif
if index(g:polyglot_disabled, 'octave') == -1

View File

@@ -47,6 +47,9 @@ filetypes:
linguist: C
- name: cpp
linguist: C++
ignored_extensions:
# conflicts with more popular reason, remove after heuristics work
- re
---
name: c++11
remote: octol/vim-cpp-enhanced-highlight
@@ -697,6 +700,8 @@ filetypes:
- mlip
- mli.cppo
- ml.cppo
extra_filenames:
- .ocamlinit
- name: omake
extensions:
- om
@@ -713,6 +718,24 @@ filetypes:
- name: oasis
filenames:
- _oasis
- name: dune
filenames:
- jbuild
- dune
- dune-project
- dune-workspace
- name: ocamlbuild_tags
filenames:
- _tags
- name: ocpbuild
extensions:
- ocp
- name: ocpbuildroot
extensions:
- root
- name: sexplib
extensions:
- sexp
---
name: octave
remote: McSinyx/vim-octave

View File

@@ -111,6 +111,11 @@ call TestFiletype('ocaml')
call TestFiletype('omake')
call TestFiletype('opam')
call TestFiletype('oasis')
call TestFiletype('dune')
call TestFiletype('ocamlbuild_tags')
call TestFiletype('ocpbuild')
call TestFiletype('ocpbuildroot')
call TestFiletype('sexplib')
call TestFiletype('octave')
call TestFiletype('opencl')
call TestFiletype('perl')