[ocaml] support eliom files
Eliom/eliomi is ocsigen's extensions for its files using the eliom ppx. More info at http://ocsigen.org/eliom/6.6/manual/ppx-syntax
This commit is contained in:
parent
18301b0b9a
commit
fd130a9c2e
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