Skip to content

H4-MM-3R/kotlin-lsp

Repository files navigation

Kotlin Language Server

This is a fork of amgdev9/kotlin-lsp which is an implementation of the Language Server Protocol for the Kotlin programming language, leveraging the Kotlin Analysis API to provide real time diagnostics, syntax and semantic analysis of Kotlin source files and libraries.

It's developed as part of the Kotlin LSP Project of Google Summer of Code 2025 under Kotlin Foundation

Packages

You can download the latest release assets from the GitHub Releases page.

Installation:

Neovim:

create a file in your <YOUR_NEOVIM_CONFIG_DIRECTORY>/after/plugin/kotlin.lua and add the below lines in your kotlin.lua

local root_dir = vim.fs.root(0, {"settings.gradle.kts", "settings.gradle"})
if not root_dir then
    root_dir = vim.fs.root(0, {"build.gradle.kts", "build.gradle"})
end

vim.lsp.config['kotlinlsp'] = {
     cmd = { '<YOUR_KOTLIN_LSP_DIRECTORY>/lsp-dist/kotlin-lsp-1.5/bin/kotlin-lsp' },
    -- if you want to connect through tcp use --tcp flag
    -- cmd = vim.lsp.rpc.connect('0.0.0.0', tonumber(2090)),
    filetypes = { 'kotlin' },
    root_dir = root_dir
}

vim.lsp.enable('kotlinlsp')

Now you can directly open any file of a project to start the LSP

VSCode:

vscode-extension-screenshot

Now you can directly open any file of a project to start the LSP

References

About

Language Server for Kotlin as a part of GSOC 2025 under Kotlin Foundation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6