-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the ocaml filetype into several filetypes
Now ocamlinterface ocamllex and menhir types must be taken into account as well. Menhir filetype is not included as there seem to be no plans to include it and even then it would take a big effort. The filetypes are introduced by ocaml/vim-ocaml#61
- Loading branch information
Showing
5 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
" Activate merlin on current buffer | ||
call merlin#Register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
" Activate merlin on current buffer | ||
call merlin#Register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
" Enable Syntastic support | ||
" Make sure syntax_checkers directory is on runtime path, then set | ||
" :let g:syntastic_ocamlinterface_checkers=['merlin'] | ||
|
||
function! SyntaxCheckers_ocamlinterface_merlin_IsAvailable() | ||
if !exists("*merlin#SelectBinary") | ||
return 0 | ||
endif | ||
try | ||
let l:path = merlin#SelectBinary() | ||
return executable(l:path) | ||
catch | ||
return 0 | ||
endtry | ||
endfunction | ||
|
||
function! SyntaxCheckers_ocamlinterface_merlin_GetLocList() | ||
return merlin#ErrorLocList() | ||
endfunction | ||
|
||
call g:SyntasticRegistry.CreateAndRegisterChecker({ | ||
\ 'filetype': 'ocamlinterface', | ||
\ 'name': 'merlin'}) |