Skip to content

Support for Language Server Protocol #1287

@svenefftinge

Description

@svenefftinge

##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

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:

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.

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 Language Server Protocol: Respect Language Server capabilities on IDE client #1789

Diagnostics

RI: C#, JSON

  • Shows errors and warnings inside editor.

diagnostics

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.

completion

Goto Definition

RI: C#

Perform search for symbol definition and allows to navigate.

goto definition

Find References

RI: C#

Search project-wide references for the symbol denoted by the given text

find references

Document Symbols

RI: JSON

Allow to view and navigate document symbols. In most cases it’s can be described as flat outline

document symbols

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.

workspace symbols

Document Formatting

RI: JSON

Format all document.

Document Range Formatting

RI: C#, JSON

Format selected range in document.

document range formatting

Document on Type Formatting

RI: C#

Automatically invoke formatting after special character typed.

document on type formatting

Hover

RI: C#, JSON

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:

hover

Or for java hover may show javadoc:

hover2

Signature Help

RI: C#

Shows signature information at a given cursor position. For strongly typed programming languages it’s may shows method parameters types:

signature help1

signature help2

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/epicA long-lived, PM-driven feature request. Must include a checklist of items that must be completed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions