Skip to content

Languages & Required Tools ​

Kompile's coding tools split cleanly into what works out of the box (zero external binaries) and what uses external language servers on your PATH.

What needs to be installed vs what works out of the box ​

LayerExternal Tools Needed?How It Works
Local Code Index (local_code_index)None (built into Kompile)Offline SQLite + FTS5 indexer with dedicated structural parsers for JVM, Python, Go, Rust, JS/TS, C/C++/C#, and .splan, plus FTS5/file/rationale indexing for config & scripting languages
File Context & Notes (file_context, file_note, file_activity)None (built into Kompile)Reads the local SQLite index, .kompile/graph.kgraph, file-notes.json, and open incidents
LSP (lsp)Yes — one language server per languageLaunches real language servers from your PATH (first installed binary in each fallback chain wins). Run lsp action=servers server_action=list at any time to see what Kompile detects on your machine.

How each language works in Kompile ​

1. Local Code Index parser tiers (zero install) ​

Kompile's offline LocalCodeIndexer supports two extraction depths:

  • Full structural entity & relation extraction (classes, interfaces, enums, records, annotations, methods, functions, fields, imports, packages, call/inheritance relations, signatures, callers, implementors, impact, debug_trace):
    • JVM: Java (.java), Kotlin (.kt, .kts), Scala (.scala), Groovy (.groovy, .gradle)
    • C-family: C (.c, .h), C++ (.cpp, .cc, .cxx, .hpp), C# (.cs)
    • Web: JavaScript (.js, .jsx, .mjs), TypeScript (.ts, .tsx)
    • Python: .py, .pyi
    • Go: .go
    • Rust: .rs
    • SPlan: .splan
  • File, FTS5 search, and rationale-comment indexing: Swift, Ruby, PHP, Bash, SQL, JSON, YAML, TOML, XML, HTML, CSS, Markdown, Protobuf, ANTLR (.g4).

2. Major language setups for LSP (root detection, build files, & gotchas) ​

Java & JVM (Java, Kotlin, Scala, Groovy, Clojure) ​

  • Java (jdtls): Needs JDK 17+ and the Eclipse JDT LS jdtls launcher on PATH. Detects project root via pom.xml, build.gradle, build.gradle.kts, or .git. First startup indexes the project and can take up to 90s (LspServerManager keeps jdtls warm for 30 minutes before idle reaping, vs 10 minutes for other servers).
  • Kotlin (kotlin-lsp / kotlin-language-server): Prefers JetBrains kotlin-lsp --stdio, falls back to kotlin-language-server. Root markers: settings.gradle.kts, settings.gradle, build.gradle.kts, pom.xml, .git.
  • Scala (metals): Install via Coursier (cs install metals). Root markers: build.sbt, build.sc, build.mill, .git (startup timeout 120s).
  • Groovy / Clojure: groovy-language-server (build.gradle) and clojure-lsp (deps.edn, project.clj, shadow-cljs.edn, bb.edn).

C, C++, CUDA & Objective-C ​

  • Server: clangd --background-index --log=error (falls back to ccls). Handles .c, .h, .cpp, .hpp, .cc, .hh, .cxx, .hxx, .cu, .cuh, .inl, .ipp, .tpp, .m, .mm.
  • Required build metadata (compile_commands.json): clangd needs your compiler flags and include paths to resolve headers and macros accurately:
    bash
    # CMake
    cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
    
    # Make / Ninja / custom build systems (via Bear)
    bear -- make -j
  • Multi-backend builds (CPU + CUDA, etc.): Declare each build's compile database in <project>/.kompile/lsp-check.json so lsp action=check pools one clangd per backend (EXACT for sources, INCLUDER for headers, INFERRED for new/unincluded files, and automatic nvcc → clang CUDA frontend flag rewriting).

Python ​

  • Server: pyright-langserver --stdio (recommended: npm i -g pyright), falling back in order to basedpyright-langserver --stdio (pip install basedpyright), pylsp (pip install python-lsp-server), or jedi-language-server.
  • Root markers: pyproject.toml, setup.py, setup.cfg, requirements.txt, .git.
  • Tip: Point pyrightconfig.json or [tool.pyright] in pyproject.toml at your .venv so imports resolve cleanly without spurious unresolved-import errors.

TypeScript, JavaScript & Web Frameworks ​

  • TS / JS: typescript-language-server --stdio (npm i -g typescript-language-server typescript), falling back to vtsls --stdio. Handles .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts.
  • Root markers: tsconfig.json, jsconfig.json, package.json, .git. Make sure project dependencies (node_modules) are installed so type resolution works.
  • Framework servers: Vue (@vue/language-server), Svelte (svelte-language-server), Astro (@astrojs/language-server), HTML/CSS/JSON (vscode-langservers-extracted), GraphQL (graphql-language-service-cli).

Rust ​

  • Server: rust-analyzer (rustup component add rust-analyzer).
  • Root markers: Cargo.toml, .git. First run compiles proc-macros / workspace metadata (startup timeout 45s).

Go ​

  • Server: gopls (go install golang.org/x/tools/gopls@latest).
  • Root markers: go.work, go.mod, .git. Ensure $GOPATH/bin (typically ~/go/bin) is on your PATH.

C# & F# (.NET) ​

  • C#: csharp-ls (dotnet tool install --global csharp-ls), falling back to OmniSharp -lsp.
  • F#: fsautocomplete (dotnet tool install --global fsautocomplete).
  • Root markers: global.json, Directory.Build.props, .git (startup timeout 90s).

Complete built-in LSP server & install reference ​

Kompile checks each server's primary command first, then its fallback alternatives in order. Customize paths or disable any entry in ~/.kompile/lsp-servers.json.

Systems, JVM & .NET ​

LanguagePrimary CommandFallbacksRoot MarkersInstall Command / Hint
Javajdtls—pom.xml, build.gradle, build.gradle.kts, .gitInstall Eclipse JDT LS (jdtls on PATH, needs JDK 17+)
Kotlinkotlin-lsp --stdiokotlin-language-serversettings.gradle(.kts), build.gradle.kts, pom.xml, .gitJetBrains kotlin-lsp or kotlin-language-server
Scalametals—build.sbt, build.sc, build.mill, .gitcs install metals
Groovygroovy-language-server—build.gradle, settings.gradle, .gitBuild GroovyLanguageServer/groovy-language-server on PATH
Clojureclojure-lsp—deps.edn, project.clj, shadow-cljs.edn, bb.edn, .gitInstall clojure-lsp (brew / nix / GitHub release)
C / C++ / CUDA / ObjCclangd --background-index --log=errorcclscompile_commands.json, .clangd, .gitInstall clangd (LLVM / distro clang-tools-extra) + compile_commands.json
Rustrust-analyzer—Cargo.toml, .gitrustup component add rust-analyzer
Gogopls—go.work, go.mod, .gitgo install golang.org/x/tools/gopls@latest
Zigzls—build.zig, .gitInstall zls release matching your zig version
Swiftsourcekit-lsp—Package.swift, .gitShips with the Swift toolchain (swift.org/install)
Fortranfortls—.fortls, fpm.toml, .gitpip install fortls
C#csharp-lsOmniSharp -lspglobal.json, Directory.Build.props, .gitdotnet tool install --global csharp-ls
F#fsautocomplete—global.json, Directory.Build.props, .gitdotnet tool install --global fsautocomplete

Scripting, Dynamic & Functional ​

LanguagePrimary CommandFallbacksRoot MarkersInstall Command / Hint
Pythonpyright-langserver --stdiobasedpyright-langserver, pylsp, jedi-language-serverpyproject.toml, setup.py, setup.cfg, requirements.txt, .gitnpm i -g pyright or pip install basedpyright
Rubyruby-lspsolargraph stdioGemfile, .gitgem install ruby-lsp (or solargraph)
PHPintelephense --stdiophpactor language-servercomposer.json, .gitnpm i -g intelephense (or phpactor)
Lualua-language-server—.luarc.json, .stylua.toml, .gitInstall lua-language-server (LuaLS / brew / distro)
Perlperlnavigator --stdioplscpanfile, Makefile.PL, .gitnpm i -g perlnavigator-server (or cpanm PLS)
RR --no-echo -e "languageserver::run()"—DESCRIPTION, .Rproj.user, .gitIn R: install.packages("languageserver")
Juliajulia ... -e "using LanguageServer; runserver()"—Project.toml, .gitIn Julia: ] add LanguageServer
Bash / Shellbash-language-server start—.gitnpm i -g bash-language-server (+ shellcheck for diagnostics)
PowerShellpwsh ... Start-EditorServices -Stdio—.gitPowerShell 7 + PowerShellEditorServices module
Haskellhaskell-language-server-wrapper --lsphaskell-language-server --lsphie.yaml, stack.yaml, cabal.project, package.yaml, .gitghcup install hls
OCamlocamllsp—dune-project, dune-workspace, .gitopam install ocaml-lsp-server
Elixirelixir-lslanguage_server.sh, expert --stdio, lexicalmix.exs, .gitInstall elixir-ls (or Expert / Lexical) on PATH
Erlangelp servererlang_lsrebar.config, erlang.mk, .gitInstall ELP (erlang-language-platform) or erlang_ls
Gleamgleam lsp—gleam.toml, .gitShips with the gleam binary
Elmelm-language-server --stdio—elm.json, .gitnpm i -g @elm-tooling/elm-language-server
Dartdart language-server --protocol=lsp—pubspec.yaml, .gitShips with the Dart / Flutter SDK

Web, Data, Config & Infrastructure ​

LanguagePrimary CommandFallbacksRoot MarkersInstall Command / Hint
TypeScript / JStypescript-language-server --stdiovtsls --stdiotsconfig.json, jsconfig.json, package.json, .gitnpm i -g typescript-language-server typescript
Vuevue-language-server --stdio—package.json, .gitnpm i -g @vue/language-server
Sveltesvelteserver --stdio—svelte.config.js, package.json, .gitnpm i -g svelte-language-server
Astroastro-ls --stdio—astro.config.mjs, package.json, .gitnpm i -g @astrojs/language-server
HTML / CSS / JSONvscode-{html,css,json}-language-server --stdio—package.json / .gitnpm i -g vscode-langservers-extracted
GraphQLgraphql-lsp server -m stream—.graphqlrc, graphql.config.js, package.json, .gitnpm i -g graphql-language-service-cli
YAMLyaml-language-server --stdio—.gitnpm i -g yaml-language-server
TOMLtaplo lsp stdio—.taplo.toml, taplo.toml, .gitcargo install taplo-cli --locked --features lsp
XMLlemminx—.gitInstall Eclipse LemMinX (lemminx on PATH)
Markdownmarksman server—.marksman.toml, .gitInstall marksman (GitHub release / brew)
LaTeXtexlab—.latexmkrc, latexmkrc, .gitInstall texlab (cargo / brew / release)
SQLsqlssql-language-server up --method stdio.gitgo install github.com/sqls-server/sqls@latest
Dockerfiledocker-langserver --stdio—.gitnpm i -g dockerfile-language-server-nodejs
Terraform / OpenTofuterraform-ls servetofu-ls serve.terraform, .gitInstall terraform-ls (HashiCorp release / brew)
Nixnilnixdflake.nix, default.nix, .gitInstall nil (or nixd) via nix profile
CMakecmake-language-serverneocmakelsp --stdioCMakePresets.json, CMakeLists.txt, .gitpip install cmake-language-server (or neocmakelsp)
Protobufbuf lsp serveprotolsbuf.yaml, buf.work.yaml, .gitInstall buf (buf.build) or protols

Verify what is installed on your machine ​

Inside any Kompile chat, ask:

"Check which language servers are installed and running on this machine."

Or run /explain lsp (or kompile explain lsp from your shell). Kompile reports every configured language, whether its binary was found on PATH, whether an instance is currently running, and the exact install hint for anything missing.

Next steps ​

Released under the Apache-2.0 License.