Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.83 KB

EDITORS.md

File metadata and controls

56 lines (40 loc) · 1.83 KB

Editor Integration

Visual Studio Code

See vscode-kotlin-ide or install the extension from the marketplace.

Atom

See atom-ide-kotlin.

Emacs

using lsp-mode

Add the language server executable to your PATH.

Vim

using LanguageClient-neovim

Add the language server to your PATH and include the following configuration in your .vimrc:

autocmd BufReadPost *.kt setlocal filetype=kotlin

let g:LanguageClient_serverCommands = {
    \ 'kotlin': ["kotlin-language-server"],
    \ }

using coc.nvim

Add the following to your coc-settings.json file:

{
    "languageserver": {
        "kotlin": {
            "command": "[path to cloned language server]/server/build/install/server/bin/kotlin-language-server",
            "filetypes": ["kotlin"]
        }
    }
}

Note that you may need to substitute kotlin-language-server with kotlin-language-server.bat on Windows.

Other Editors

Install a Language Server Protocol client for your tool. Then invoke the language server executable in a client-specific way.

The server can be launched in three modes:

  • Stdio (the default mode)
    • The language server uses the standard streams for JSON-RPC communication
  • TCP Server
    • The language server starts a server socket and listens on --tcpServerPort
  • TCP Client
    • The language server tries to connect to --tcpClientHost and --tcpClientPort

The mode is automatically determined by the arguments provided to the language server.