Some insights about Kotlin LSP: LSP is a common language for programming language analyzers to speak to each other, this includes not only IDEs but also tools and AI agents.
https://langserver.org
For Kotlin specifically, there is an opensource LSP implementation already but it is unmaintained and inefficient - it simply wraps over kotlinc and uses eclipse lsp4j. An ideal LSP implementation is lightweight, built within the kotlin compiler as a compiler plugin - you can check
KSP API or the
analysis API.