SlideShare a Scribd company logo
Hey language, please add support to the hypest IDE/editor of this day!
Hey IDE/Editor, please add support for
the hypest language of this day in your
IDE/Editor !
DONE !DONE !
Language Server Protocol in action
...15 minutes later…
About...
Mickael Istria
@mickaelistria
Eclipse contributor and committer
Focused on IDE technologies
❤ Eclipse IDE and Eclipse community
[EclipseCon France 2017] Language Server Protocol in action
Hey language, please add support to the hypest IDE/editor of this day!
Hey IDE/Editor, please add support for
the hypest language of this day in your
IDE/Editor !
DONE !DONE !
Language Server Protocol in action
...15 minutes later…
Preamble - Lexic
● By language we only mean Textual Language
(ie any text with constraints) – at the moment...
● Ad-hoc languages (without constraints pre-
defined, but with constraints we can learn from
the language) are valid languages
● A server is any application that provide a
service. It can be local or remote, using
transport of its choice (not only Web nor
remote).
Integrating edition support for one
language in one tool
● Requires good knowledge of the language and its technical stack
– How to parse it
– How to do semantic analysis
– Usually a type system
– …
● Requires good knowledge of the tool and its technical stack
– What are the usual workflows and UX
– What is the development style, what are the APIs?
– …
Difficulty:
Tool and language experts
Java JS TS C# Yaml JSon Ceylon Go ...
Eclipse
IDE
3 3 3 3 ... ... ... ... ...
VSCode 3 3 ... ... ... ... ... ... ...
EclipseCh
e
3 3 ... ... ... ... ... ... ...
Emacs 3 ... ... ... ... ... ... ... ...
NeoVim ... ... ... ... ... ... ... ... ...
Gnome-
Builder
... ... ... ... ... ... ... ... ...
... ... ... ... ... ... ... ... ... ...
M languages
N IDEs/Editors
Total cost:
• O(M*N) difficult integrations
• Not usually designed for separation nor reusability as technology differ a lot
→ can drive to inconsistencies in tools
120
Enters the Language Server
Protocol
Language Server Protocol
Difficulty: Difficulty:
Tool
Language/Framework
Logic
consumes implements
<<interface>>
Tool experts Language/Framework
experts
Protocol insights
● Initiated as part of VSCode, by emeritus Eclipse
IDE contributors
● OSS and community driven aware
– Github
https://github.com/Microsoft/language-server-protocol
● Request-response and notifications based (over
JSON-RPC)
● Transport not constrained: can be stdio, IPC,
UDP…
● Deployment not constrained: local thread, local
process, remote connection...
Clients interact with a Language Server
● Clients simply connect to the language server
input and output (that may involve starting the
language server, or not)
● Then clients orchestrate requests and read
response/notifications on JSON-RPC over those
streams, and define how user interact with those.
Protocol operations
● Map well the needs of a
Text Editor
Example of communication
● Request for hover
{
"jsonrpc": "2.0",
"id": "27",
"method":
"textDocument/hover",
"params": {
"textDocument": {
"uri":
"file:///home/mistria/runtime-
demoLSP/mess/style.css"
},
"uri":
"file:///home/mistria/runtime-
demoLSP/mess/style.css",
"position": {
"line": 1,
"character": 2
}
}
}
● Response for hover
{
"jsonrpc": "2.0",
"id": "27",
"result": {
"contents": [
"Sets the background color of an
element."
],
"range": {
"start": {
"line": 1,
"character": 2
},
"end": {
"line": 1,
"character": 26
}
}
}
}
Turning the matrix into a star
Eclipse
IDE
VSCode
EclipseCh
e
Emacs
NeoVim
Gnome-
Builder
...
N IDEs/Editors
Total cost: O(M + N) integrations
• Designed for separation, distributed work and reusability
• Accessible one can decide to only work on the layer they’re skilled at
• Enforce consistency of language supports in tools
Java
JS
TS
C#
YAML
JSON
Ceylon
Go
...
32
2
2
2
2
2
2
2
Language Server Protocol
2
2
2
2
2
2
2
2
Language Server “SDKs”
● Libs already exist in multiple languages to create
language servers or clients.
● They typically map operations and entities of LSP to
APIs and Data Types.
● Eclipse LSP4J is a Java API to produce Java-based LSP
clients or servers.
Benefits for Eclipse technologies
● Ceylon, Xtend, Xtext, EMF... can implement the
LSP in their SDK and enable code-assist in
many tools at once
● Frameworks or tools that build on top of
languages can also provide additional
hints/static analysis/linters
● IDEs can implement support for LSP to easily
support many languages
Demo
Language
Server
Protocol
Demoed and detailed
at
+3 others so far:
Atom, Monaco, Gnome Builder
+20 others so far:
PowerShell, C++, JSON, CSS/LESS/SASS,
PHP, Haxe, RAML, API Elements, groovy,
SQL, Ocaml/Reason, Go, Rust, Scala, Polymer,
Julia, Python, Isabelle. GraphQL, ember
Demo debrief (1/2)
In ~20 minutes we:
– Showed CSS/HTML/C# integration in Eclipse IDE is a
matter for a few basic lines of Java and plugin.xml
– Edition using language server is comfortable and can
quickly be better than edition with unmaintained editors
– Showed VSCode integration for language servers is
simple too
– Showed Java integration in VSCode is powered by
Eclipse JDT Language Server
– ….
Demo debrief (2/2)
In ~20 minutes we:
– ...
– Showed how easy it is to create own language server with
Java and Eclipse LSP4J (just implement a few interfaces!)
– Showed how a home-made language server can very
easily be integrated in Eclipse IDE and VSCode
– Modified the language server and showed how tools can
take advantage of iteration and new features without effort
Not convinced yet? With 10 more
minutes...
● We could have shown a similar demo with any
of Python, PHP, Kubernetes Yaml dialect, or
any of the 20+ other supported languages
● We could have shown the same languages
supported similarly in Eclipse Che, Eclipse
Orion, NeoVim, Gnome-Builder or any of the
other supported tools
Limitations of LSP
● Focused on EDITION only. Missing other steps of dev
such as running, testing, debugging (a protocol-ish is
ongoing for debug)
● Misses some important operations
– Type hierarchy
– Refactorings
● Syntax highlighting not part of the protocol (but well
covered by TextMate grammars)
● Composition of LSP: how to chain them? Do multiple LS
on the same file complete one and other or conflict?
(Desired) Future of LSP
● Support for more typical edition actions (such
as refactorings or type hierarchy)
● Adoption of the Debug Server Protocol
(including support for Run and Tests)
Join the LSP game!
● https://github.com/Microsoft/language-server-protocol
– Contribute to specification
– Contribute by listing your support for a language or a tool
● Eclipse LSP4J: Contribute to Java bindings for LSP
● Eclipse LSP4E: Contribute to Eclipse IDE support for LSP
● Eclipse Che supports LSP
● Eclipse Orion supports LSP
● Other edition time technologies: consider adopting the
protocol for wider consumption

More Related Content

PDF
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
ODP
[EclipseCon France 2017] Eclipse Platform Generic Editor
PPTX
single pass compiler and its architecture
PDF
Computer programming tools and building process
PPTX
Unit 1-introduction to scripts
PPTX
Dynamic language
PDF
Livecode widget course
PPTX
QBASIC
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
[EclipseCon France 2017] Eclipse Platform Generic Editor
single pass compiler and its architecture
Computer programming tools and building process
Unit 1-introduction to scripts
Dynamic language
Livecode widget course
QBASIC

What's hot (19)

PDF
What is code - Part 1
PPTX
Components of .NET Framework
PPTX
Uses for scripting languages,web scripting in perl
PDF
Log cat kotlindsl
ODP
How to build your own programming language
PPT
.Net Overview
PPT
Programming paradigm and web programming
PPTX
Component of .net
PPTX
Swift programming language
PDF
蔡学镛 Rebol漫谈
PDF
DSLs: what, why, how
PPT
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
KEY
Future of PHP
PPTX
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
PDF
Lets Go - An introduction to Google's Go Programming Language
PPTX
Php vs asp.net most valuable differences to learn and select the best one f...
PPTX
Ruby in mule
PPTX
Chapter 1.3
PPTX
Introduction to flutter's basic concepts
What is code - Part 1
Components of .NET Framework
Uses for scripting languages,web scripting in perl
Log cat kotlindsl
How to build your own programming language
.Net Overview
Programming paradigm and web programming
Component of .net
Swift programming language
蔡学镛 Rebol漫谈
DSLs: what, why, how
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
Future of PHP
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
Lets Go - An introduction to Google's Go Programming Language
Php vs asp.net most valuable differences to learn and select the best one f...
Ruby in mule
Chapter 1.3
Introduction to flutter's basic concepts
Ad

Similar to [EclipseCon France 2017] Language Server Protocol in action (20)

PDF
Feedback from an eclipse plugin developer to provide support to large set of ...
ODP
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
PPTX
Evolution or stagnation programming languages
PDF
The Ring programming language version 1.4 book - Part 2 of 30
PDF
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
PDF
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
PDF
Adopting language server for apache camel feedback from a java/Eclipse plugi...
PDF
The Ring programming language version 1.5.2 book - Part 5 of 181
PDF
The Ring programming language version 1.7 book - Part 6 of 196
ODP
Some wonderful Linux softwares for daily use
PDF
The Ring programming language version 1.4.1 book - Part 2 of 31
ODP
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
PDF
The Ring programming language version 1.3 book - Part 4 of 88
PDF
Intermediate Languages
PPT
English de lenguaje de programacion
PDF
LAS16-108: JerryScript and other scripting languages for IoT
PDF
The Ring programming language version 1.6 book - Part 6 of 189
PPTX
Overview new programming languages
PPT
Introduction Programming Languages
PDF
The Ring programming language version 1.8 book - Part 6 of 202
Feedback from an eclipse plugin developer to provide support to large set of ...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Evolution or stagnation programming languages
The Ring programming language version 1.4 book - Part 2 of 30
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Adopting language server for apache camel feedback from a java/Eclipse plugi...
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.7 book - Part 6 of 196
Some wonderful Linux softwares for daily use
The Ring programming language version 1.4.1 book - Part 2 of 31
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
The Ring programming language version 1.3 book - Part 4 of 88
Intermediate Languages
English de lenguaje de programacion
LAS16-108: JerryScript and other scripting languages for IoT
The Ring programming language version 1.6 book - Part 6 of 189
Overview new programming languages
Introduction Programming Languages
The Ring programming language version 1.8 book - Part 6 of 202
Ad

More from Mickael Istria (13)

ODP
Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018
ODP
Parallel builds in Eclipse IDE workspace
ODP
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
ODP
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
ODP
Contribute to Eclipse projects
PDF
A journey with Target Platforms
ODP
Cool stuff in E4 for developers
PDF
Fight your technical debt with Jenkins, Jacoco and Sonar
ODP
What's up GMF Tooling?
ODP
Iterative and-agile-codegen
ODP
Modeling With Eclipse @SoftShake 2011
ODP
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
ODP
Sur la route de l'agilité @Mix-it Lyon 2011
Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018
Parallel builds in Eclipse IDE workspace
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
Contribute to Eclipse projects
A journey with Target Platforms
Cool stuff in E4 for developers
Fight your technical debt with Jenkins, Jacoco and Sonar
What's up GMF Tooling?
Iterative and-agile-codegen
Modeling With Eclipse @SoftShake 2011
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
Sur la route de l'agilité @Mix-it Lyon 2011

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPT
What is a Computer? Input Devices /output devices
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
project resource management chapter-09.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Architecture types and enterprise applications.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Modernising the Digital Integration Hub
Programs and apps: productivity, graphics, security and other tools
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Developing a website for English-speaking practice to English as a foreign la...
Group 1 Presentation -Planning and Decision Making .pptx
What is a Computer? Input Devices /output devices
DP Operators-handbook-extract for the Mautical Institute
Zenith AI: Advanced Artificial Intelligence
O2C Customer Invoices to Receipt V15A.pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
project resource management chapter-09.pdf
TLE Review Electricity (Electricity).pptx
Architecture types and enterprise applications.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
observCloud-Native Containerability and monitoring.pptx
Chapter 5: Probability Theory and Statistics
Modernising the Digital Integration Hub

[EclipseCon France 2017] Language Server Protocol in action

  • 1. Hey language, please add support to the hypest IDE/editor of this day! Hey IDE/Editor, please add support for the hypest language of this day in your IDE/Editor ! DONE !DONE ! Language Server Protocol in action ...15 minutes later…
  • 2. About... Mickael Istria @mickaelistria Eclipse contributor and committer Focused on IDE technologies ❤ Eclipse IDE and Eclipse community
  • 4. Hey language, please add support to the hypest IDE/editor of this day! Hey IDE/Editor, please add support for the hypest language of this day in your IDE/Editor ! DONE !DONE ! Language Server Protocol in action ...15 minutes later…
  • 5. Preamble - Lexic ● By language we only mean Textual Language (ie any text with constraints) – at the moment... ● Ad-hoc languages (without constraints pre- defined, but with constraints we can learn from the language) are valid languages ● A server is any application that provide a service. It can be local or remote, using transport of its choice (not only Web nor remote).
  • 6. Integrating edition support for one language in one tool ● Requires good knowledge of the language and its technical stack – How to parse it – How to do semantic analysis – Usually a type system – … ● Requires good knowledge of the tool and its technical stack – What are the usual workflows and UX – What is the development style, what are the APIs? – … Difficulty: Tool and language experts
  • 7. Java JS TS C# Yaml JSon Ceylon Go ... Eclipse IDE 3 3 3 3 ... ... ... ... ... VSCode 3 3 ... ... ... ... ... ... ... EclipseCh e 3 3 ... ... ... ... ... ... ... Emacs 3 ... ... ... ... ... ... ... ... NeoVim ... ... ... ... ... ... ... ... ... Gnome- Builder ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... M languages N IDEs/Editors Total cost: • O(M*N) difficult integrations • Not usually designed for separation nor reusability as technology differ a lot → can drive to inconsistencies in tools 120
  • 8. Enters the Language Server Protocol Language Server Protocol Difficulty: Difficulty: Tool Language/Framework Logic consumes implements <<interface>> Tool experts Language/Framework experts
  • 9. Protocol insights ● Initiated as part of VSCode, by emeritus Eclipse IDE contributors ● OSS and community driven aware – Github https://github.com/Microsoft/language-server-protocol ● Request-response and notifications based (over JSON-RPC) ● Transport not constrained: can be stdio, IPC, UDP… ● Deployment not constrained: local thread, local process, remote connection...
  • 10. Clients interact with a Language Server ● Clients simply connect to the language server input and output (that may involve starting the language server, or not) ● Then clients orchestrate requests and read response/notifications on JSON-RPC over those streams, and define how user interact with those.
  • 11. Protocol operations ● Map well the needs of a Text Editor
  • 12. Example of communication ● Request for hover { "jsonrpc": "2.0", "id": "27", "method": "textDocument/hover", "params": { "textDocument": { "uri": "file:///home/mistria/runtime- demoLSP/mess/style.css" }, "uri": "file:///home/mistria/runtime- demoLSP/mess/style.css", "position": { "line": 1, "character": 2 } } } ● Response for hover { "jsonrpc": "2.0", "id": "27", "result": { "contents": [ "Sets the background color of an element." ], "range": { "start": { "line": 1, "character": 2 }, "end": { "line": 1, "character": 26 } } } }
  • 13. Turning the matrix into a star Eclipse IDE VSCode EclipseCh e Emacs NeoVim Gnome- Builder ... N IDEs/Editors Total cost: O(M + N) integrations • Designed for separation, distributed work and reusability • Accessible one can decide to only work on the layer they’re skilled at • Enforce consistency of language supports in tools Java JS TS C# YAML JSON Ceylon Go ... 32 2 2 2 2 2 2 2 Language Server Protocol 2 2 2 2 2 2 2 2
  • 14. Language Server “SDKs” ● Libs already exist in multiple languages to create language servers or clients. ● They typically map operations and entities of LSP to APIs and Data Types. ● Eclipse LSP4J is a Java API to produce Java-based LSP clients or servers.
  • 15. Benefits for Eclipse technologies ● Ceylon, Xtend, Xtext, EMF... can implement the LSP in their SDK and enable code-assist in many tools at once ● Frameworks or tools that build on top of languages can also provide additional hints/static analysis/linters ● IDEs can implement support for LSP to easily support many languages
  • 16. Demo Language Server Protocol Demoed and detailed at +3 others so far: Atom, Monaco, Gnome Builder +20 others so far: PowerShell, C++, JSON, CSS/LESS/SASS, PHP, Haxe, RAML, API Elements, groovy, SQL, Ocaml/Reason, Go, Rust, Scala, Polymer, Julia, Python, Isabelle. GraphQL, ember
  • 17. Demo debrief (1/2) In ~20 minutes we: – Showed CSS/HTML/C# integration in Eclipse IDE is a matter for a few basic lines of Java and plugin.xml – Edition using language server is comfortable and can quickly be better than edition with unmaintained editors – Showed VSCode integration for language servers is simple too – Showed Java integration in VSCode is powered by Eclipse JDT Language Server – ….
  • 18. Demo debrief (2/2) In ~20 minutes we: – ... – Showed how easy it is to create own language server with Java and Eclipse LSP4J (just implement a few interfaces!) – Showed how a home-made language server can very easily be integrated in Eclipse IDE and VSCode – Modified the language server and showed how tools can take advantage of iteration and new features without effort
  • 19. Not convinced yet? With 10 more minutes... ● We could have shown a similar demo with any of Python, PHP, Kubernetes Yaml dialect, or any of the 20+ other supported languages ● We could have shown the same languages supported similarly in Eclipse Che, Eclipse Orion, NeoVim, Gnome-Builder or any of the other supported tools
  • 20. Limitations of LSP ● Focused on EDITION only. Missing other steps of dev such as running, testing, debugging (a protocol-ish is ongoing for debug) ● Misses some important operations – Type hierarchy – Refactorings ● Syntax highlighting not part of the protocol (but well covered by TextMate grammars) ● Composition of LSP: how to chain them? Do multiple LS on the same file complete one and other or conflict?
  • 21. (Desired) Future of LSP ● Support for more typical edition actions (such as refactorings or type hierarchy) ● Adoption of the Debug Server Protocol (including support for Run and Tests)
  • 22. Join the LSP game! ● https://github.com/Microsoft/language-server-protocol – Contribute to specification – Contribute by listing your support for a language or a tool ● Eclipse LSP4J: Contribute to Java bindings for LSP ● Eclipse LSP4E: Contribute to Eclipse IDE support for LSP ● Eclipse Che supports LSP ● Eclipse Orion supports LSP ● Other edition time technologies: consider adopting the protocol for wider consumption