I think Jetbrains did that already; the Kotlin LSP server is derived from the (also open source) IntelliJ plugin