question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

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.

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#

  • Language Server Protocol: Find Reference #1421

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

find references

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

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

  • 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 range formatting

Document on Type Formatting

RI: C#

  • Language Server Protocol: Implement document formatting #1788

Automatically invoke formatting after special character typed.

document on type formatting

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:

hover

Or for java hover may show javadoc:

hover2

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:

signature help1

signature help2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:57 (43 by maintainers)

github_iconTop GitHub Comments

4reactions
nadakocommented, May 19, 2016

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.

3reactions
TylerJewellcommented, Sep 13, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Server Protocol - Microsoft Open Source
The idea behind the Language Server Protocol (LSP) is to standardize the protocol for how such servers and development tools communicate. This way,...
Read more >
Language Server
Language Maintainer Repository Ada AdaCore github.com/AdaCore/ada_language_server ANTLR Ken Domino github.com/kaby76/AntlrVSIX Apache Camel Camel Tooling github.com/camel‑tooling/camel‑language‑server
Read more >
Language Server Extension Guide - Visual Studio Code
Language Server is a special kind of Visual Studio Code extension that powers the editing experience for many programming languages. With Language Servers,...
Read more >
Language Server Protocol - Wikipedia
The goal of the protocol is to allow programming language support to be implemented and distributed independently of any given editor or IDE....
Read more >
Language Server Protocol Overview - Visual Studio (Windows)
The language server protocol (LSP) is the product of standardizing the messages exchanged between a development tool and a language server ...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found