Merge pull request #2353 from facelesspanda/lang/eliom
lang/ocaml: support eliom files
This commit is contained in:
commit
a5ff21f212
1 changed files with 5 additions and 0 deletions
|
@ -113,4 +113,9 @@
|
||||||
(setq +format-with 'ocp-indent)
|
(setq +format-with 'ocp-indent)
|
||||||
(when (and (executable-find "ocamlformat")
|
(when (and (executable-find "ocamlformat")
|
||||||
(locate-dominating-file default-directory ".ocamlformat"))
|
(locate-dominating-file default-directory ".ocamlformat"))
|
||||||
|
(let ((ext (file-name-extension buffer-file-name t)))
|
||||||
|
(cond ((equal ext ".eliom")
|
||||||
|
(setq-local ocamlformat-file-kind 'implementation))
|
||||||
|
((equal ext ".eliomi")
|
||||||
|
(setq-local ocamlformat-file-kind 'interface))))
|
||||||
(setq +format-with 'ocamlformat))))
|
(setq +format-with 'ocamlformat))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue