8000 GitHub - AlexandrosAlexiou/kotlin.nvim: Neovim LSP Extensions for kotlin-lsp by JetBrains
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

AlexandrosAlexiou/kotlin.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kotlin.nvim

Extensions for the built-in Language Server Protocol support in Neovim (>= 0.11.0) for kotlin-lsp.

🧩 Extensions

  • Decompile and open class file contents using kotlin-lsp decompile command
  • Export workspace to JSON using kotlin-lsp exportWorkspace command
  • Support for custom JVM arguments
  • Support kotlin-lsp installation from Mason

📦 Installation

Install the plugin with your package manager:

{
    "AlexandrosAlexiou/kotlin.nvim",
    ft = { "kotlin" },
    config = function()
        require("kotlin").setup {
            -- Optional: Specify root markers for multi-module projects
            root_markers = {
                "gradlew",
                ".git",
                "mvnw",
                "settings.gradle",
            },
            -- Optional: Specify a custom Java path to run the server
            jre_path = os.getenv("JDK21"),
            -- Optional: Specify additional JVM arguments
            jvm_args = {
                "-Xmx4g",
            },
        }
    end,
},

🧱 Language Server Installation

You can easily install kotlin-lsp using Mason with the following command:

:MasonInstall kotlin-lsp

Caution

If you use other tools like nvim-lspconfig or mason-lspconfig, make sure to explicitly exclude the kotlin_lsp configuration there to avoid conflicts.

There is no need to follow the manual installation steps from the upstream guide. Mason will handle everything for you.

💐 Credits

About

Neovim LSP Extensions for kotlin-lsp by JetBrains

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0