Haskell-ide-engine: language-server-protocol compatibility

Created on 22 Sep 2016  Â·  11Comments  Â·  Source: haskell/haskell-ide-engine

How about using the language-server-protocol ?

The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, goto definition, find all references and alike into the tool. The following diagram illustrates the communication between a tool and the language server.

https://code.visualstudio.com/blogs/2016/06/27/common-language-protocol

open spec:

https://github.com/Microsoft/language-server-protocol

This is just the start – communities for programming languages like OmniSharp (C#), JSON, C++, xText, JavaFX, and R have made commitments to release language servers for their languages in the future. A full list of protocol implementations, including language servers, editors, and SDKs is available on the GitHub repo.

All 11 comments

See also #204

See start at https://github.com/alanz/haskell-lsp

The idea is to implement the protocol itself in a general way, so other people writing tooling in Haskell for other languages can easily use it.

Ping @hoovercj : Long shot, are you able to offer any advice here?

What type of advice are you looking for? Advice on whether standardizing on the microsoft Language Service Protocol is a good idea/how to do it? Or something else?

First, confirmation that it is a good idea, and then any pointers, particularly at anything similar to use as a model. I was thinking of using the powershell plugin as a reference.

And of course any more active participation would be welcome too.

To clarify, you would like to create an implementation of the protocol in haskell that would allow you to communicate with VSCode, Eclipse Che, and any other editor or tool that adopts the protocol through stdin/stdout?

So you would have a repository like https://github.com/felixfbecker/php-language-server and then a simple wrapper extension like https://github.com/felixfbecker/vscode-php-intellisense for vscode and other editors?

If it can be done more easily than me cobbling together the existing pieces for a one-editor solution then it seems like a decent idea.~

And trust me, you don't want any haskell contributed by me :-)

Yes, that is the idea. I am currently inching my way through the language server example in the vscode documentation, and can get it to call an external shell script which just returns errors. Next to implement a trivial haskell server that just returns a well-formed error message. Then build from there.

Thanks for the examples, will refer to them often I am sure.

And I pinged you because of the hlint extension you wrote :)

Hopefully you've also seen vscode-ghc-mod? I started writing them when I started a haskell mooc...but then I got too distracted by making the tools that I abandoned the mooc :-)

It sounds like you have a plan for moving forward. Good luck!

Thanks, I have seen it. But focussing on the language server element. As the best way to leverage things, as it becomes more prevalent.

And it is worth persevering with haskell. Tough to get started, but worth it.

Was this page helpful?
0 / 5 - 0 ratings