Start point for documentation related to eclipse language services
The idea is to have a proof of concept of Language Services on Eclipse by:
-
implementing a subclass of SSE Structured Editor that sends data to a language service
As protocol we refer to the vscode languageserver protocol, implemented under MIT license by the team of E.Gamma, (MicroSoft) .
The easiest way to have a language server running is to install VSCode: http://code.visualstudio.com/
-
How to run the JavaScript language server
-
Start VSCode
-
Clone a git repo with JS code: https://github.com/josdejong/mathjs
-
Open the cloned folder in VSCode
We choose to start implementing a JavaScript Editor as VSCode already provides a Language Server Service for a JavaScript editor. You can extend this by adding any other editor, as example XML, Java, Xtext, PHP, HTML, XSLT, SASS, etc.
-
We created a plugin
org.eclipse.lsp4e
, which implements an extension toorg.eclipse.wst.jsdt.ui.javaCompletionProposalComputer
. -
The LanguageCompletionProposalComputer#computeCompletionProposals(..) is the method that actually provides content assist.
-
To run, you need to setup for JSDT, explained here: https://www.youtube.com/watch?v=gOz1hk-ohMA
-
Sven put an interesting comment to ensime-server see: https://github.com/ensime/ensime-server/issues/1498
-
Initial prototype of language server protocol extension for Che using the TypeFox API: https://github.com/eclipse/che/pull/1323/commits/e250864c89228875723649268a72a87d91057033