Add ocaml-language-server for OCaml and ReasonML#1110
Merged
Conversation
w0rp
approved these changes
Nov 11, 2017
w0rp
left a comment
Member
There was a problem hiding this comment.
Looks good. I'll merge this for the JSONRPC changes.
Could you create a follow up pull request with tests for the new linter functions? That's the best way to protect against regressions.
Member
|
Cheers! 🍻 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ocaml-language-server provides editor support for OCaml and Reason using the Language Server Protocol.
I had to remove the
idfield on the request object, because technically a notification must not have anid, which is different fromid: null(present, butnull).From JSON-RPC 2.0 Specification - Notification
And JSON-RPC 2.0 Specification - Request object:
ocaml-language-server is built with vscode-languageserver, which is very strict about this and does not accept notifications with an
id, even if it'snull.After removing
'id': v:null, Vim reorders the fields to{"method": "someMethod", "jsonrpc": "2.0"}for whatever reason, so I swapped them in the source to avoid confusion. The order only affects the tests.For the record: