From 11cd0740f4af92cfc1c0f52433fcf9476e702ceb Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 7 Nov 2018 07:09:58 -0500 Subject: [PATCH] Support ocaml-language-server out of the box (#149) Copyright-paperwork-exempt: yes * eglot.el (eglot-server-programs): Add ocaml-language-server. * README.md (Installation and usage): Mention ocaml-language-server --- README.md | 3 ++- eglot.el | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38698dd4..0d73d378 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ for the language of your choice. Otherwise, it prompts you to enter one: * Haskell's [IDE engine][haskell-ide-engine] * Kotlin's [kotlin-language-server][kotlin-language-server] * Golang's [go-langserver][go-langserver] +* Ocaml's [ocaml-language-server][ocaml-language-server] I'll add to this list as I test more servers. In the meantime you can customize `eglot-server-programs`: @@ -303,4 +304,4 @@ Under the hood: [kotlin-language-server]: https://github.com/fwcd/KotlinLanguageServer [go-langserver]: https://github.com/sourcegraph/go-langserver [eclipse-jdt]: https://github.com/eclipse/eclipse.jdt.ls - +[ocaml-language-server]: https://github.com/freebroccolo/ocaml-language-server diff --git a/eglot.el b/eglot.el index 0a789702..2ce9d086 100644 --- a/eglot.el +++ b/eglot.el @@ -85,6 +85,8 @@ rjsx-mode) . ("javascript-typescript-stdio")) (sh-mode . ("bash-language-server" "start")) ((c++-mode c-mode) . ("ccls")) + ((caml-mode tuareg-mode reason-mode) + . ("ocaml-language-server" "--stdio")) (ruby-mode . ("solargraph" "socket" "--port" :autoport))