Closed as not planned
Description
Update (June 2022):
A prototype of a language server using the new analysis APIs can be found in the kotlin-analysis-server
repo. Note that this is not production ready and mostly intended as a playground for experimentation currently.
The Kotlin frontend is currently undergoing large architectural changes with the migration to FIR and will provide some new APIs for IDE-related usage that we could hook into, once ready.
The interesting modules seem to be mostly located in analysis
(in the Kotlin repo). Useful resources:
- Official Kotlin repo:
- The docs for the analysis API
- ...including this overview of the API (explicitly mentions LSP as a use case)
- ...and this usage doc
KtAnalysisSession
fromanalysis
- The
analysis-api-standalone
project
- The docs for the analysis API
- IntelliJ IDEA repo:
- Kotlin Symbol Processor (KSP):
- An example project using the standalone analysis API
- See this
build.gradle.kts
for an example of the Maven repos and dependencies needed for the analysis API - See this
main
method for an example how to bootstrap the compiler/analysis APIs
- Kotlin Website:
- YouTrack:
- This issue tracking standalone mode for the analysis API (explicitly mentions LSP as a use case)
- This issue regarding prototyping of an IDE plugin
- This issue regarding use of Analysis API with Frontend 1.0
- Kotlin Blog:
- This blog post:
The road to the K2 compiler
- The linked YouTube video, which includes an overview over the new compiler architecture
- This blog post:
- Kotlin Slack (requires invitation, see here):