SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
The Language Server Protocol:
Why the Hype?
Mikael Barbero

Eclipse Foundation

Eclipse Summit India 2017
Dear IDE, please
support this new trendy
language!
Dear IDE, please
support this new trendy
language!
Dear language, please
provide integration with
my favorite IDE!
Dear IDE, please
support this new trendy
language!
Dear language, please
provide integration with
my favorite IDE!
Dear IDE, please
support this new trendy
language!
Dear language, please
provide integration with
my favorite IDE!
Language Server Protocol helps building language support!
Implementing language support for an IDE is hard
Expert of the tool Expert of the language
Parser
Semantic analysis
Type system
UI Workflows
APIs
Integration
Java Javascript C/C++ Go Json Rust CSS ...
Eclipse
Eclipse Che
Eclipse Orion
Atom
VisualStudio
Code
...
What is the so-called
Language Server Protocol (LSP)?
–Phil Karlton
“There are only two hard things in Computer Science:
cache invalidation and naming things.”
–Phil Karlton
“There are only two hard things in Computer Science:
cache invalidation and naming things.”
What is the so-called
Language Server Protocol (LSP)?
“A bad name for a Remote Procedure Call (RPC) API that is
used between by a tool and a language smartness provider to
integrate features like auto complete, goto definition, find all
references and alike into the tool”
“A bad name for a Remote Procedure Call (RPC) API that is
used between by a tool and a language smartness provider to
integrate features like auto complete, goto definition, find all
references and alike into the tool”
https://github.com/Microsoft/language-server-protocol
LSP
(RPC API)
Program A
LSP
(RPC API)
Program A Program B
LSP
(RPC API)
Tool
Program A Program B
LSP
(RPC API)
Language
Smartness
Provider
Tool
Program A Program B
LSP
(RPC API)
Language
Smartness
Provider
Tool
Program A Program B
LSP
(RPC API)
Language
Smartness
Provider
Tool
Program A Program B
LSP
(Client)
(RPC API)
Language
Smartness
Provider
Tool
Program A Program B
LSP
(Client) (Server)
(RPC API)
Language
Smartness
Provider
Tool
Program A Program B
LSP
Language
Smartness
Provider
Tool
Program A Program B
LSP
Tool
Tool
Tool
Language
Smartness Provider
Tool
Tool
Tool
Language
Smartness Provider
N
o
m
ultitenancy
Implementing language support for an IDE is easier
Expert of the tool Expert of the language
Parser
Semantic analysis
Type system
UI Workflows
APIs
Integration
LSP
Eclipse
Eclipse Che
Eclipse Orion
Atom
VisualStudio
Code
...
Java
Javascript
C/C++
Go
Json
Rust
CSS
...
LSP
DRY
(don't repeat yourself)
Current Status - Clients Support
Eclipse CheEclipse (LSP4e) NeoVim
Visual Studio
Code
Sublime TextEmacs VimAtom
Work in Progress
Eclipse Orion
Current Status - Languages Support
Current Status - LSP SDKs
node.js MS vscode-languageserver-node
C# MS work in progress by David Wilson
Java Eclipse, TypeFox Eclipse LSP4J
Haxe @nadako language-server-protocol-haxe
PHP Felix Becker php-language-server
Rust Bruno Medeiros RustLSP
Haskell Alan Zimmerman Haskell-LSP
C# OmniSharp C#-LSP
C# Inomata Kentaro LanguageServerProtocol
SDK/libraries support implementing the protocol in a particular language.
LSP in depth
JSON-RPC based API
)]}'
JSON-RPC
Stateless RPC
protocol
(use "id" used by client to
track responses)
JSON as data
format of request
and responses
Agnostic of
transport layer
(can be Sockets, Shared
Memory, PIPE, HTTP, ...)
JSON-RPC
Program A Program B
JSON-RPC
{
"jsonrpc": "2.0",
"method": "subtract",
"params": [42, 23],
"id": 1
}
Program A Program B
JSON-RPC
{
"jsonrpc": "2.0",
"result": 19,
"id": 1
}
{
"jsonrpc": "2.0",
"method": "subtract",
"params": [42, 23],
"id": 1
}
Program A Program B
Agnostic of
transport layer
(can be Sockets, Shared
Memory, PIPE, HTTP, ...)
Clients can only communicate with servers if they
talk on the same transport channel.
e.g., if a server only supports pipes (stdin / stdout),
a client that uses sockets won’t be able to use it.
LSP in a nutshell
A set of JSON-RPC requests,
responses and notifications to integrate
tools (clients) and language smartness
providers (servers)
LSP: Client Requests
Completion
Requests a list of completion
items from a document
position. Resolution can be
done in two steps
Hover
Requests hover information at a
given text document position.
Result is a markdown string or
a pair of a language and a code
block value
Signature Help
Requests signature
information at a given cursor
position (e.g. used to display a
tooltip with signature when
typing a method call)
References
Requests to resolve project-
wide references for the
symbol denoted by the given
text document position
Workspace Symbols
Requests to list project-wide
symbols matching the query
string (usually the name /
name prefix of the symbol)
Document Symbols
Requests to list all symbols
found in a given text
document
LSP: Client Requests (cont'd)
Formatting
Requests to format a whole
document
Range Formatting
Requests to format a given
range in a document
On Type Formatting
Requests to format parts of
the document during typing.
Trigger characters are
configured at registration time
Go to Definition
Requests to resolve the
definition location of a symbol
at a given text document
position
Code Action
Requests to compute
commands for a given text
document and range. Can be
used for instance to get the
list of quick fixes for a given
problem
Code Lens
Request to compute code
lenses for a given text
document. It returns a list of
commands to be executed for
some text ranges (e.g.
number of references)
LSP: Client Requests (cont'd again)
Rename
Requests to perform a
workspace-wide rename of a
symbol
Document Links
Requests the location of links
in a document. Resolution can
be done in two steps
Document Highlight
Requests to resolve a
document highlights for a
given text document position
(e.g., to mark all occurrences
of the variable for a given
position)
Typical lifecycle (startup)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Client Tool
(e.g., Eclipse, VSCode)
Typical lifecycle (startup)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Start
Client Tool
(e.g., Eclipse, VSCode)
(not defined by LSP)
Can be child process, daemon, run image in
container, HEAD http://server/status, …
Typical lifecycle (startup)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Start
Initialize
Params: rootUri, the root URI of the workspace + client
capabilities
The protocol does not define how the rootUri parameter should be used by the servers. Most servers expect file: URIs. JDT-LS uses
this URI to provision an Eclipse Workspace (i.e. imports all Eclipse, Gradle and Maven projects it can find in the rootUri hierarchy).
Client Tool
(e.g., Eclipse, VSCode)
(not defined by LSP)
Can be child process, daemon, run image in
container, HEAD http://server/status, …
Typical lifecycle (startup)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Start
Initialize
Params: rootUri, the root URI of the workspace + client
capabilities
Returns server capabilities (like how text documents are
synced)
The protocol does not define how the rootUri parameter should be used by the servers. Most servers expect file: URIs. JDT-LS uses
this URI to provision an Eclipse Workspace (i.e. imports all Eclipse, Gradle and Maven projects it can find in the rootUri hierarchy).
Client Tool
(e.g., Eclipse, VSCode)
(not defined by LSP)
Can be child process, daemon, run image in
container, HEAD http://server/status, …
Typical lifecycle (editing)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Client Tool
(e.g., Eclipse, VSCode)
Typical lifecycle (editing)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
didOpen
Client Tool
(e.g., Eclipse, VSCode)
Notifies the server that the document's truth is now
managed by the client and the server must not try to
read the document's truth using the document's uri
Typical lifecycle (editing)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
didOpen
didChange
Signals changes to a text document (the granularity of the
reported changes are defined by server capabilities)
Client Tool
(e.g., Eclipse, VSCode)
Notifies the server that the document's truth is now
managed by the client and the server must not try to
read the document's truth using the document's uri
Typical lifecycle (editing)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
didOpen
didChange
Signals changes to a text document (the granularity of the
reported changes are defined by server capabilities)
Usually will notify about new diagnostics, some time later
Client Tool
(e.g., Eclipse, VSCode)
Notifies the server that the document's truth is now
managed by the client and the server must not try to
read the document's truth using the document's uri
Typical lifecycle (editing)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
didOpen
didChange
Signals changes to a text document (the granularity of the
reported changes are defined by server capabilities)
Usually will notify about new diagnostics, some time later
The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not
need to be notified about these events.
Client Tool
(e.g., Eclipse, VSCode)
Notifies the server that the document's truth is now
managed by the client and the server must not try to
read the document's truth using the document's uri
Typical lifecycle (saving)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Client Tool
(e.g., Eclipse, VSCode)
The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not
need to be notified about these events.
Typical lifecycle (saving)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
willSave | willSaveWaitUntil
Client Tool
(e.g., Eclipse, VSCode)
+ Reason of the save (manual, after delay, focus out). "Wait until" is a way to
get all the edits that should be apply before saving (e.g. if a refactoring has
been requested before and it still being computed on the server side)
The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not
need to be notified about these events.
Typical lifecycle (saving)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
willSave | willSaveWaitUntil
didSave
Can include the whole text document if server capabilities
require it
Client Tool
(e.g., Eclipse, VSCode)
+ Reason of the save (manual, after delay, focus out). "Wait until" is a way to
get all the edits that should be apply before saving (e.g. if a refactoring has
been requested before and it still being computed on the server side)
The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not
need to be notified about these events.
Typical lifecycle (saving)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
willSave | willSaveWaitUntil
didSave
Can include the whole text document if server capabilities
require it
The document's truth now exists where the document's uri
points to.
Client Tool
(e.g., Eclipse, VSCode)
+ Reason of the save (manual, after delay, focus out). "Wait until" is a way to
get all the edits that should be apply before saving (e.g. if a refactoring has
been requested before and it still being computed on the server side)
didClose
The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not
need to be notified about these events.
Typical lifecycle (shutdown)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
Client Tool
(e.g., Eclipse, VSCode)
Typical lifecycle (shutdown)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
shutdown
Client Tool
(e.g., Eclipse, VSCode)
Asks the server to shut down, but to not exit (otherwise the
response might not be delivered correctly to the client)
Typical lifecycle (shutdown)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
shutdown
May return errors
Client Tool
(e.g., Eclipse, VSCode)
Asks the server to shut down, but to not exit (otherwise the
response might not be delivered correctly to the client)
Typical lifecycle (shutdown)
Client
(e.g., VSCode, Eclipse)
Language Server
(e.g., JDT-LS, PHP-LS)
shutdown
exit
May return errors
Asks the server to exit its process. The server should exit
with success code 0 if the shutdown request has been
received before; otherwise with error code 1.
The specification explicitly talk about exiting a process on the ‘exit’ notification. Of course, some clients that will interact with daemons,
containers or HTTP servers will use this notification differently.
Client Tool
(e.g., Eclipse, VSCode)
Asks the server to shut down, but to not exit (otherwise the
response might not be delivered correctly to the client)
Server does no editing
All editing is done on the client side
• The server can read files, but all file modifications
are sent to the clients in the form of a
WorkspaceEdit.
• The client applies the edits and notifies the server
about the changes so he can refresh changed
files.
• To execute a command (e.g. quick fix or a
rename), the client send a request that the server
acknowledge or not. If it does, then the server
compute the changes and send a request to the
client for him to apply the modifications
LSP Limitations
Text Editing Only
No support for running, testing or debugging
Ongoing work for debug
https://github.com/Microsoft/vscode-debugadapter-node
No Advanced Tooling
Types hierarchy Advanced refactoring
Syntax Highlighting, Bracket Matchings and Code Folding
Deferred to the client's editor
Requires tokenizer and / or grammar in addition to the language server
No Communication between Language Servers
No cross-languages go to
definition or refactoring
No Packaging Standard
• Currently: specific to each editor
• Language servers can have a lot
of native dependencies
• Possible solution: use docker to
package and run LS
No standard transport or transport negotiation
Potential solutions:
• Force transport negotiation via a
specific transport during startup
phase
• Store metadata about the language
servers in a registry / marketplace
??
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
Key Takeaways: why the hype?
Mikaël Barbero
mikael.barbero@eclipse-foundation.org
@mikbarbero
https://eclipse.org/community/eclipse_newsletter/2017/may/
Key Takeaways: why the hype?
Promising and
powerful
abstraction for
language tooling
development
Mikaël Barbero
mikael.barbero@eclipse-foundation.org
@mikbarbero
https://eclipse.org/community/eclipse_newsletter/2017/may/
Key Takeaways: why the hype?
Promising and
powerful
abstraction for
language tooling
development
Still young and has
shortcomings
Mikaël Barbero
mikael.barbero@eclipse-foundation.org
@mikbarbero
https://eclipse.org/community/eclipse_newsletter/2017/may/
Key Takeaways: why the hype?
Promising and
powerful
abstraction for
language tooling
development
Still young and has
shortcomings
Paradigm shift in
tooling
development:
microservices
Mikaël Barbero
mikael.barbero@eclipse-foundation.org
@mikbarbero
https://eclipse.org/community/eclipse_newsletter/2017/may/

Mais conteúdo relacionado

Mais procurados

JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - IntroductionWebStackAcademy
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_ceShikshak
 
Decomposing Applications for Scalability and Deployability (April 2012)
Decomposing Applications for Scalability and Deployability (April 2012)Decomposing Applications for Scalability and Deployability (April 2012)
Decomposing Applications for Scalability and Deployability (April 2012)Chris Richardson
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react nativeDani Akash
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with ReduxVedran Blaženka
 
Coding standards for java
Coding standards for javaCoding standards for java
Coding standards for javamaheshm1206
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...Edureka!
 
Experience Edge at Scale: Implementing the Sitecore Composable Stack
Experience Edge at Scale: Implementing the Sitecore Composable StackExperience Edge at Scale: Implementing the Sitecore Composable Stack
Experience Edge at Scale: Implementing the Sitecore Composable StackJeffrey Rondeau
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreBaris Ceviz
 

Mais procurados (20)

.Net Core
.Net Core.Net Core
.Net Core
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_c
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Decomposing Applications for Scalability and Deployability (April 2012)
Decomposing Applications for Scalability and Deployability (April 2012)Decomposing Applications for Scalability and Deployability (April 2012)
Decomposing Applications for Scalability and Deployability (April 2012)
 
Javascript
JavascriptJavascript
Javascript
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
Angular
AngularAngular
Angular
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
 
Coding standards for java
Coding standards for javaCoding standards for java
Coding standards for java
 
Java script
Java scriptJava script
Java script
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
Experience Edge at Scale: Implementing the Sitecore Composable Stack
Experience Edge at Scale: Implementing the Sitecore Composable StackExperience Edge at Scale: Implementing the Sitecore Composable Stack
Experience Edge at Scale: Implementing the Sitecore Composable Stack
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAX
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
 
Java script
Java scriptJava script
Java script
 
Css position
Css positionCss position
Css position
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 

Semelhante a Language Server Protocol - Why the Hype?

Integrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio CodeIntegrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio CodeKarsten Thoms
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...IndicThreads
 
[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in actionMickael Istria
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
Learn about Java framework for pen-based computing and the Livescribe Platfor...
Learn about Java framework for pen-based computing and the Livescribe Platfor...Learn about Java framework for pen-based computing and the Livescribe Platfor...
Learn about Java framework for pen-based computing and the Livescribe Platfor...Marakana Inc.
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseSteve Reiner
 
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...Mickael Istria
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsTim Burks
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languagesactanimation
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swiftTim Burks
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamDataWorks Summit
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionEelco Visser
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Ary Borenszweig
 

Semelhante a Language Server Protocol - Why the Hype? (20)

Integrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio CodeIntegrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio Code
 
Avro
AvroAvro
Avro
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Visual studio
Visual studioVisual studio
Visual studio
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
Best node js course
Best node js courseBest node js course
Best node js course
 
Learn about Java framework for pen-based computing and the Livescribe Platfor...
Learn about Java framework for pen-based computing and the Livescribe Platfor...Learn about Java framework for pen-based computing and the Livescribe Platfor...
Learn about Java framework for pen-based computing and the Livescribe Platfor...
 
DSL explained _
DSL explained _DSL explained _
DSL explained _
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
 
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 

Mais de mikaelbarbero

Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating SystemKubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating Systemmikaelbarbero
 
What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)mikaelbarbero
 
The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?mikaelbarbero
 
What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...mikaelbarbero
 
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)mikaelbarbero
 
Sirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsSirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsmikaelbarbero
 
Modeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitModeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitmikaelbarbero
 
Diff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF CompareDiff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF Comparemikaelbarbero
 
Eclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshellEclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshellmikaelbarbero
 
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be MisunderstoodOSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstoodmikaelbarbero
 
EMF.Edit the Force Unleashed!
EMF.Edit the Force Unleashed!EMF.Edit the Force Unleashed!
EMF.Edit the Force Unleashed!mikaelbarbero
 
EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)mikaelbarbero
 
EMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to MillionsEMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to Millionsmikaelbarbero
 
3mf infinity-and-beyond
3mf infinity-and-beyond3mf infinity-and-beyond
3mf infinity-and-beyondmikaelbarbero
 
Eclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare ImprovementsEclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare Improvementsmikaelbarbero
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantesmikaelbarbero
 
5M lines of code migration
5M lines of code migration5M lines of code migration
5M lines of code migrationmikaelbarbero
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)mikaelbarbero
 

Mais de mikaelbarbero (19)

Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating SystemKubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
 
What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)
 
The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?
 
What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...
 
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
 
Sirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsSirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLs
 
Modeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitModeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGit
 
Diff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF CompareDiff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF Compare
 
Eclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshellEclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshell
 
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be MisunderstoodOSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
 
EMF.Edit the Force Unleashed!
EMF.Edit the Force Unleashed!EMF.Edit the Force Unleashed!
EMF.Edit the Force Unleashed!
 
EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)
 
EMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to MillionsEMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to Millions
 
3mf infinity-and-beyond
3mf infinity-and-beyond3mf infinity-and-beyond
3mf infinity-and-beyond
 
Eclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare ImprovementsEclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare Improvements
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantes
 
5M lines of code migration
5M lines of code migration5M lines of code migration
5M lines of code migration
 
EMFPath
EMFPathEMFPath
EMFPath
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
 

Último

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 

Último (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 

Language Server Protocol - Why the Hype?

  • 1. The Language Server Protocol: Why the Hype? Mikael Barbero Eclipse Foundation Eclipse Summit India 2017
  • 2. Dear IDE, please support this new trendy language!
  • 3. Dear IDE, please support this new trendy language! Dear language, please provide integration with my favorite IDE!
  • 4. Dear IDE, please support this new trendy language! Dear language, please provide integration with my favorite IDE!
  • 5. Dear IDE, please support this new trendy language! Dear language, please provide integration with my favorite IDE! Language Server Protocol helps building language support!
  • 6. Implementing language support for an IDE is hard Expert of the tool Expert of the language Parser Semantic analysis Type system UI Workflows APIs Integration
  • 7. Java Javascript C/C++ Go Json Rust CSS ... Eclipse Eclipse Che Eclipse Orion Atom VisualStudio Code ...
  • 8. What is the so-called Language Server Protocol (LSP)?
  • 9. –Phil Karlton “There are only two hard things in Computer Science: cache invalidation and naming things.”
  • 10. –Phil Karlton “There are only two hard things in Computer Science: cache invalidation and naming things.”
  • 11. What is the so-called Language Server Protocol (LSP)?
  • 12. “A bad name for a Remote Procedure Call (RPC) API that is used between by a tool and a language smartness provider to integrate features like auto complete, goto definition, find all references and alike into the tool”
  • 13. “A bad name for a Remote Procedure Call (RPC) API that is used between by a tool and a language smartness provider to integrate features like auto complete, goto definition, find all references and alike into the tool”
  • 17. Program A Program B LSP (RPC API)
  • 18. Tool Program A Program B LSP (RPC API)
  • 22. Language Smartness Provider Tool Program A Program B LSP (Client) (Server) (RPC API)
  • 27. Implementing language support for an IDE is easier Expert of the tool Expert of the language Parser Semantic analysis Type system UI Workflows APIs Integration LSP
  • 29. Current Status - Clients Support Eclipse CheEclipse (LSP4e) NeoVim Visual Studio Code Sublime TextEmacs VimAtom Work in Progress Eclipse Orion
  • 30. Current Status - Languages Support
  • 31. Current Status - LSP SDKs node.js MS vscode-languageserver-node C# MS work in progress by David Wilson Java Eclipse, TypeFox Eclipse LSP4J Haxe @nadako language-server-protocol-haxe PHP Felix Becker php-language-server Rust Bruno Medeiros RustLSP Haskell Alan Zimmerman Haskell-LSP C# OmniSharp C#-LSP C# Inomata Kentaro LanguageServerProtocol SDK/libraries support implementing the protocol in a particular language.
  • 34. JSON-RPC Stateless RPC protocol (use "id" used by client to track responses) JSON as data format of request and responses Agnostic of transport layer (can be Sockets, Shared Memory, PIPE, HTTP, ...)
  • 36. JSON-RPC { "jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1 } Program A Program B
  • 37. JSON-RPC { "jsonrpc": "2.0", "result": 19, "id": 1 } { "jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1 } Program A Program B
  • 38. Agnostic of transport layer (can be Sockets, Shared Memory, PIPE, HTTP, ...) Clients can only communicate with servers if they talk on the same transport channel. e.g., if a server only supports pipes (stdin / stdout), a client that uses sockets won’t be able to use it.
  • 39. LSP in a nutshell A set of JSON-RPC requests, responses and notifications to integrate tools (clients) and language smartness providers (servers)
  • 40. LSP: Client Requests Completion Requests a list of completion items from a document position. Resolution can be done in two steps Hover Requests hover information at a given text document position. Result is a markdown string or a pair of a language and a code block value Signature Help Requests signature information at a given cursor position (e.g. used to display a tooltip with signature when typing a method call) References Requests to resolve project- wide references for the symbol denoted by the given text document position Workspace Symbols Requests to list project-wide symbols matching the query string (usually the name / name prefix of the symbol) Document Symbols Requests to list all symbols found in a given text document
  • 41. LSP: Client Requests (cont'd) Formatting Requests to format a whole document Range Formatting Requests to format a given range in a document On Type Formatting Requests to format parts of the document during typing. Trigger characters are configured at registration time Go to Definition Requests to resolve the definition location of a symbol at a given text document position Code Action Requests to compute commands for a given text document and range. Can be used for instance to get the list of quick fixes for a given problem Code Lens Request to compute code lenses for a given text document. It returns a list of commands to be executed for some text ranges (e.g. number of references)
  • 42. LSP: Client Requests (cont'd again) Rename Requests to perform a workspace-wide rename of a symbol Document Links Requests the location of links in a document. Resolution can be done in two steps Document Highlight Requests to resolve a document highlights for a given text document position (e.g., to mark all occurrences of the variable for a given position)
  • 43. Typical lifecycle (startup) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Client Tool (e.g., Eclipse, VSCode)
  • 44. Typical lifecycle (startup) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Start Client Tool (e.g., Eclipse, VSCode) (not defined by LSP) Can be child process, daemon, run image in container, HEAD http://server/status, …
  • 45. Typical lifecycle (startup) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Start Initialize Params: rootUri, the root URI of the workspace + client capabilities The protocol does not define how the rootUri parameter should be used by the servers. Most servers expect file: URIs. JDT-LS uses this URI to provision an Eclipse Workspace (i.e. imports all Eclipse, Gradle and Maven projects it can find in the rootUri hierarchy). Client Tool (e.g., Eclipse, VSCode) (not defined by LSP) Can be child process, daemon, run image in container, HEAD http://server/status, …
  • 46. Typical lifecycle (startup) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Start Initialize Params: rootUri, the root URI of the workspace + client capabilities Returns server capabilities (like how text documents are synced) The protocol does not define how the rootUri parameter should be used by the servers. Most servers expect file: URIs. JDT-LS uses this URI to provision an Eclipse Workspace (i.e. imports all Eclipse, Gradle and Maven projects it can find in the rootUri hierarchy). Client Tool (e.g., Eclipse, VSCode) (not defined by LSP) Can be child process, daemon, run image in container, HEAD http://server/status, …
  • 47. Typical lifecycle (editing) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Client Tool (e.g., Eclipse, VSCode)
  • 48. Typical lifecycle (editing) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) didOpen Client Tool (e.g., Eclipse, VSCode) Notifies the server that the document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri
  • 49. Typical lifecycle (editing) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) didOpen didChange Signals changes to a text document (the granularity of the reported changes are defined by server capabilities) Client Tool (e.g., Eclipse, VSCode) Notifies the server that the document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri
  • 50. Typical lifecycle (editing) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) didOpen didChange Signals changes to a text document (the granularity of the reported changes are defined by server capabilities) Usually will notify about new diagnostics, some time later Client Tool (e.g., Eclipse, VSCode) Notifies the server that the document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri
  • 51. Typical lifecycle (editing) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) didOpen didChange Signals changes to a text document (the granularity of the reported changes are defined by server capabilities) Usually will notify about new diagnostics, some time later The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not need to be notified about these events. Client Tool (e.g., Eclipse, VSCode) Notifies the server that the document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri
  • 52. Typical lifecycle (saving) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Client Tool (e.g., Eclipse, VSCode) The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not need to be notified about these events.
  • 53. Typical lifecycle (saving) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) willSave | willSaveWaitUntil Client Tool (e.g., Eclipse, VSCode) + Reason of the save (manual, after delay, focus out). "Wait until" is a way to get all the edits that should be apply before saving (e.g. if a refactoring has been requested before and it still being computed on the server side) The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not need to be notified about these events.
  • 54. Typical lifecycle (saving) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) willSave | willSaveWaitUntil didSave Can include the whole text document if server capabilities require it Client Tool (e.g., Eclipse, VSCode) + Reason of the save (manual, after delay, focus out). "Wait until" is a way to get all the edits that should be apply before saving (e.g. if a refactoring has been requested before and it still being computed on the server side) The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not need to be notified about these events.
  • 55. Typical lifecycle (saving) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) willSave | willSaveWaitUntil didSave Can include the whole text document if server capabilities require it The document's truth now exists where the document's uri points to. Client Tool (e.g., Eclipse, VSCode) + Reason of the save (manual, after delay, focus out). "Wait until" is a way to get all the edits that should be apply before saving (e.g. if a refactoring has been requested before and it still being computed on the server side) didClose The didOpen, didChange (and willSave, save, didClose) are not mandatory. Some servers expose via their capabilities that they do not need to be notified about these events.
  • 56. Typical lifecycle (shutdown) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) Client Tool (e.g., Eclipse, VSCode)
  • 57. Typical lifecycle (shutdown) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) shutdown Client Tool (e.g., Eclipse, VSCode) Asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client)
  • 58. Typical lifecycle (shutdown) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) shutdown May return errors Client Tool (e.g., Eclipse, VSCode) Asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client)
  • 59. Typical lifecycle (shutdown) Client (e.g., VSCode, Eclipse) Language Server (e.g., JDT-LS, PHP-LS) shutdown exit May return errors Asks the server to exit its process. The server should exit with success code 0 if the shutdown request has been received before; otherwise with error code 1. The specification explicitly talk about exiting a process on the ‘exit’ notification. Of course, some clients that will interact with daemons, containers or HTTP servers will use this notification differently. Client Tool (e.g., Eclipse, VSCode) Asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client)
  • 60. Server does no editing All editing is done on the client side • The server can read files, but all file modifications are sent to the clients in the form of a WorkspaceEdit. • The client applies the edits and notifies the server about the changes so he can refresh changed files. • To execute a command (e.g. quick fix or a rename), the client send a request that the server acknowledge or not. If it does, then the server compute the changes and send a request to the client for him to apply the modifications
  • 62. Text Editing Only No support for running, testing or debugging Ongoing work for debug https://github.com/Microsoft/vscode-debugadapter-node
  • 63. No Advanced Tooling Types hierarchy Advanced refactoring
  • 64. Syntax Highlighting, Bracket Matchings and Code Folding Deferred to the client's editor Requires tokenizer and / or grammar in addition to the language server
  • 65. No Communication between Language Servers No cross-languages go to definition or refactoring
  • 66. No Packaging Standard • Currently: specific to each editor • Language servers can have a lot of native dependencies • Possible solution: use docker to package and run LS
  • 67. No standard transport or transport negotiation Potential solutions: • Force transport negotiation via a specific transport during startup phase • Store metadata about the language servers in a registry / marketplace
  • 69. Key Takeaways: why the hype? Mikaël Barbero mikael.barbero@eclipse-foundation.org @mikbarbero https://eclipse.org/community/eclipse_newsletter/2017/may/
  • 70. Key Takeaways: why the hype? Promising and powerful abstraction for language tooling development Mikaël Barbero mikael.barbero@eclipse-foundation.org @mikbarbero https://eclipse.org/community/eclipse_newsletter/2017/may/
  • 71. Key Takeaways: why the hype? Promising and powerful abstraction for language tooling development Still young and has shortcomings Mikaël Barbero mikael.barbero@eclipse-foundation.org @mikbarbero https://eclipse.org/community/eclipse_newsletter/2017/may/
  • 72. Key Takeaways: why the hype? Promising and powerful abstraction for language tooling development Still young and has shortcomings Paradigm shift in tooling development: microservices Mikaël Barbero mikael.barbero@eclipse-foundation.org @mikbarbero https://eclipse.org/community/eclipse_newsletter/2017/may/