Support for Language Server Protocol
See original GitHub issue##The VSCode team has recently published the version 2.0 of their language-server protocol. The goal is to define common API for editors such as VSCode or Che to interact with language services like
- TypeScript language services
- OmniSharp (C#)
- Tern or the recently announced Orion JS services
- Ensime (for Scala and Java)
- and probably more (please add them to this ticket).
We have started using this protocol for communication between Che and Xtext and would like to move the Che part here and collaborate on the development. @evidolob: could you create a branch, against which we can make a PR with the basic projects we have created so far?
Tasks in this Epic includes part 1 of implementation:
- Dependency: Agent deployment and management #1823
- Language Server Protocol: Respect Language Server capabilities on IDE client #1789
- Shows errors and warnings inside editor.
- Intellisense - auto-completion in a context aware setting
- Goto Definition #1423
- Language Server Protocol: Find Reference #1421
- Language Server Protocol: Implement client part for “Go To Symbol” feature #1791
- Workspace symbols to list project-wide symbols matching a query string.
- Language Server Protocol: Implement document formatting #1788
- Language Server Protocol: Hover feature #1800
- Language Server Protocol: Signature Help feature #1801
- Language Server Protocol: Refactor Symbol navigation UI #1809
- Language Server Protocol: Support incremental updates #1425
Language Server Agents.
LS agents are injected into workspace configuration:
“agents” : [“org.eclipse.che.ls.json”, “org.eclipse.che.ls.csharp”]
LS agents and LS binaries are located at remote storage. For the time being it is Codenvy Update Server. Agents are available by the following urls:
https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.json
https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.csharp
When workspace is created agents are being applied. Basically it means agents script execution over running instance. After that LS can be started on demand when user opens files associated with installed LS.
- Dependency: Agent deployment and management #1823
Bug:
Code Assistant and Code Validation don’t work for C# #2509
Initialize process:
- User opens file with LS support.
- LS Editor provider calls vs-agent to initialize LS.
- LanguageRegistryService on vs-agent calls LanguageServerRegistry to find and start LS.
- LanguageServerRegistry launch LS.
- When new LS is launched and initialized, LS capabilities passed to IDE.
- IDE use LS capabilities to create editor and open file.
- Language Server Protocol: Respect Language Server capabilities on IDE client #1789
Diagnostics
RI: C#, JSON
- Shows errors and warnings inside editor.
Completion (IntelliSense)
RI: C#, JSON
- Intellisense - auto-completion in a context aware setting
Is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes. Attempts to do this are usually done through auto completion popups when typing, querying parameters of functions, query hints related to syntax errors, etc.
Goto Definition
RI: C#
- Goto Definition #1423
Perform search for symbol definition and allows to navigate.
Find References
RI: C#
- Language Server Protocol: Find Reference #1421
Search project-wide references for the symbol denoted by the given text
Document Symbols
RI: JSON
- Language Server Protocol: Implement client part for “Go To Symbol” feature #1791
Allow to view and navigate document symbols. In most cases it’s can be described as flat outline
Workspace Symbols
RI: C#
- Workspace symbox to list project-wide symbols matching a query string. Workspace symbols is the list project-wide symbols matching the query string. It’s allow to navigate not only for file or class name but for method or field.
Document Formatting
RI: JSON
- Language Server Protocol: Implement document formatting #1788
Format all document.
Document Range Formatting
RI: C#, JSON
- Language Server Protocol: Implement document formatting #1788
Format selected range in document.
Document on Type Formatting
RI: C#
- Language Server Protocol: Implement document formatting #1788
Automatically invoke formatting after special character typed.
Hover
RI: C#, JSON
- Language Server Protocol: Hover feature #1800
The hover shows useful information, such as types of symbols, or, in the case of CSS below, the shape of the HTML that would match a certain CSS rule:
Or for java hover may show javadoc:
Signature Help
RI: C#
- Language Server Protocol: Signature Help feature #1801
Shows signature information at a given cursor position. For strongly typed programming languages it’s may shows method parameters types:
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:57 (43 by maintainers)
Top GitHub Comments
Nice, this is exactly what I had in mind when I started developing haxe-languageserver - that not only VSCode can implement and make use of that protocol, but any editor/IDE! Looking forward for it to be implemented in Eclipse, so I could try adding Haxe support for it, using the language server.
@vazexqi - you asked about delivery timeframes - this looks like it will be completed for M2 or M3 of the 5.0.0 release train, which is very near term, likely this month.