Minimal cross-platform LSP wrapper for merlin
merlin
, written in reason:warning: Alpha quality
merlin-language-server
is a thin wrapper over the excellent merlin
tooling - implementing the LSP protocol on-top of merlin
's protocol.
As with ocaml-language-server
, this is not intended as a replacement for any existing Reason / OCaml tooling, but to make it more accessible across editors.
There are already two excellent language server implementations - reason-language-server
and ocaml-language-server
- why another one?
The current language-server landspace could be summarized with this table:
Language Server | Uses merlin |
Implemented in reason |
Supports Windows |
---|---|---|---|
ocaml-language-server |
:white_check_mark: | :x: | :x: (1) |
reason-language-server |
:x: | :white_check_mark: | :x: (2) |
merlin-language-server |
:white_check_mark: | :white_check_mark: | :white_check_mark: |
NOTE (1): I believe
ocaml-language-server
may support Windows, but I was not able to get it working.
NOTE (2):
reason-language-server
mentions Windows support as a goal, but again, it did not work for me. I contributed several fixes towards this (PRs #36, #130, #199), but there is still significant investment required to get support on parity withmerlin
on Windows.
The primary issue for me being that there was not a language server implementation that worked well for me on Windows. It turns out that merlin
works great on Windows - so having a native-reason LSP implementation that uses merlin
is a natural choice.
In the future, perhaps we could integrate this more fully into merlin
at some point, or incorporate merlin
as a library that we call directly.
esy
to build - npm install -g esy
node
.git clone https://github.com/bryphe/merlin-language-server
esy install
esy build
esy x TestRunner.exe
cd test-e2e
npm install
npm test
textDocument/didOpen
textDocument/didChange
completion
hover
definition
implementation
references
signatureHelp
codeAction
?codeLens
formatting
rangeFormatting
onTypeFormatting
Contributions & PRs are welcome! Please ensure that test coverage is added for any new functionality - either in the form of unit tests or E2E tests.
Copyright 2018 Bryan Phelps