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
| Layer | External 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 language | Launches 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
- JVM: Java (
- 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 LSjdtlslauncher onPATH. Detects project root viapom.xml,build.gradle,build.gradle.kts, or.git. First startup indexes the project and can take up to 90s (LspServerManagerkeepsjdtlswarm for 30 minutes before idle reaping, vs 10 minutes for other servers). - Kotlin (
kotlin-lsp/kotlin-language-server): Prefers JetBrainskotlin-lsp --stdio, falls back tokotlin-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) andclojure-lsp(deps.edn,project.clj,shadow-cljs.edn,bb.edn).
C, C++, CUDA & Objective-C
- Server:
clangd --background-index --log=error(falls back toccls). Handles.c,.h,.cpp,.hpp,.cc,.hh,.cxx,.hxx,.cu,.cuh,.inl,.ipp,.tpp,.m,.mm. - Required build metadata (
compile_commands.json):clangdneeds 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.jsonsolsp action=checkpools oneclangdper backend (EXACTfor sources,INCLUDERfor headers,INFERREDfor new/unincluded files, and automaticnvcc→ clang CUDA frontend flag rewriting).
Python
- Server:
pyright-langserver --stdio(recommended:npm i -g pyright), falling back in order tobasedpyright-langserver --stdio(pip install basedpyright),pylsp(pip install python-lsp-server), orjedi-language-server. - Root markers:
pyproject.toml,setup.py,setup.cfg,requirements.txt,.git. - Tip: Point
pyrightconfig.jsonor[tool.pyright]inpyproject.tomlat your.venvso 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 tovtsls --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 yourPATH.
C# & F# (.NET)
- C#:
csharp-ls(dotnet tool install --global csharp-ls), falling back toOmniSharp -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
| Language | Primary Command | Fallbacks | Root Markers | Install Command / Hint |
|---|---|---|---|---|
| Java | jdtls | — | pom.xml, build.gradle, build.gradle.kts, .git | Install Eclipse JDT LS (jdtls on PATH, needs JDK 17+) |
| Kotlin | kotlin-lsp --stdio | kotlin-language-server | settings.gradle(.kts), build.gradle.kts, pom.xml, .git | JetBrains kotlin-lsp or kotlin-language-server |
| Scala | metals | — | build.sbt, build.sc, build.mill, .git | cs install metals |
| Groovy | groovy-language-server | — | build.gradle, settings.gradle, .git | Build GroovyLanguageServer/groovy-language-server on PATH |
| Clojure | clojure-lsp | — | deps.edn, project.clj, shadow-cljs.edn, bb.edn, .git | Install clojure-lsp (brew / nix / GitHub release) |
| C / C++ / CUDA / ObjC | clangd --background-index --log=error | ccls | compile_commands.json, .clangd, .git | Install clangd (LLVM / distro clang-tools-extra) + compile_commands.json |
| Rust | rust-analyzer | — | Cargo.toml, .git | rustup component add rust-analyzer |
| Go | gopls | — | go.work, go.mod, .git | go install golang.org/x/tools/gopls@latest |
| Zig | zls | — | build.zig, .git | Install zls release matching your zig version |
| Swift | sourcekit-lsp | — | Package.swift, .git | Ships with the Swift toolchain (swift.org/install) |
| Fortran | fortls | — | .fortls, fpm.toml, .git | pip install fortls |
| C# | csharp-ls | OmniSharp -lsp | global.json, Directory.Build.props, .git | dotnet tool install --global csharp-ls |
| F# | fsautocomplete | — | global.json, Directory.Build.props, .git | dotnet tool install --global fsautocomplete |
Scripting, Dynamic & Functional
| Language | Primary Command | Fallbacks | Root Markers | Install Command / Hint |
|---|---|---|---|---|
| Python | pyright-langserver --stdio | basedpyright-langserver, pylsp, jedi-language-server | pyproject.toml, setup.py, setup.cfg, requirements.txt, .git | npm i -g pyright or pip install basedpyright |
| Ruby | ruby-lsp | solargraph stdio | Gemfile, .git | gem install ruby-lsp (or solargraph) |
| PHP | intelephense --stdio | phpactor language-server | composer.json, .git | npm i -g intelephense (or phpactor) |
| Lua | lua-language-server | — | .luarc.json, .stylua.toml, .git | Install lua-language-server (LuaLS / brew / distro) |
| Perl | perlnavigator --stdio | pls | cpanfile, Makefile.PL, .git | npm i -g perlnavigator-server (or cpanm PLS) |
| R | R --no-echo -e "languageserver::run()" | — | DESCRIPTION, .Rproj.user, .git | In R: install.packages("languageserver") |
| Julia | julia ... -e "using LanguageServer; runserver()" | — | Project.toml, .git | In Julia: ] add LanguageServer |
| Bash / Shell | bash-language-server start | — | .git | npm i -g bash-language-server (+ shellcheck for diagnostics) |
| PowerShell | pwsh ... Start-EditorServices -Stdio | — | .git | PowerShell 7 + PowerShellEditorServices module |
| Haskell | haskell-language-server-wrapper --lsp | haskell-language-server --lsp | hie.yaml, stack.yaml, cabal.project, package.yaml, .git | ghcup install hls |
| OCaml | ocamllsp | — | dune-project, dune-workspace, .git | opam install ocaml-lsp-server |
| Elixir | elixir-ls | language_server.sh, expert --stdio, lexical | mix.exs, .git | Install elixir-ls (or Expert / Lexical) on PATH |
| Erlang | elp server | erlang_ls | rebar.config, erlang.mk, .git | Install ELP (erlang-language-platform) or erlang_ls |
| Gleam | gleam lsp | — | gleam.toml, .git | Ships with the gleam binary |
| Elm | elm-language-server --stdio | — | elm.json, .git | npm i -g @elm-tooling/elm-language-server |
| Dart | dart language-server --protocol=lsp | — | pubspec.yaml, .git | Ships with the Dart / Flutter SDK |
Web, Data, Config & Infrastructure
| Language | Primary Command | Fallbacks | Root Markers | Install Command / Hint |
|---|---|---|---|---|
| TypeScript / JS | typescript-language-server --stdio | vtsls --stdio | tsconfig.json, jsconfig.json, package.json, .git | npm i -g typescript-language-server typescript |
| Vue | vue-language-server --stdio | — | package.json, .git | npm i -g @vue/language-server |
| Svelte | svelteserver --stdio | — | svelte.config.js, package.json, .git | npm i -g svelte-language-server |
| Astro | astro-ls --stdio | — | astro.config.mjs, package.json, .git | npm i -g @astrojs/language-server |
| HTML / CSS / JSON | vscode-{html,css,json}-language-server --stdio | — | package.json / .git | npm i -g vscode-langservers-extracted |
| GraphQL | graphql-lsp server -m stream | — | .graphqlrc, graphql.config.js, package.json, .git | npm i -g graphql-language-service-cli |
| YAML | yaml-language-server --stdio | — | .git | npm i -g yaml-language-server |
| TOML | taplo lsp stdio | — | .taplo.toml, taplo.toml, .git | cargo install taplo-cli --locked --features lsp |
| XML | lemminx | — | .git | Install Eclipse LemMinX (lemminx on PATH) |
| Markdown | marksman server | — | .marksman.toml, .git | Install marksman (GitHub release / brew) |
| LaTeX | texlab | — | .latexmkrc, latexmkrc, .git | Install texlab (cargo / brew / release) |
| SQL | sqls | sql-language-server up --method stdio | .git | go install github.com/sqls-server/sqls@latest |
| Dockerfile | docker-langserver --stdio | — | .git | npm i -g dockerfile-language-server-nodejs |
| Terraform / OpenTofu | terraform-ls serve | tofu-ls serve | .terraform, .git | Install terraform-ls (HashiCorp release / brew) |
| Nix | nil | nixd | flake.nix, default.nix, .git | Install nil (or nixd) via nix profile |
| CMake | cmake-language-server | neocmakelsp --stdio | CMakePresets.json, CMakeLists.txt, .git | pip install cmake-language-server (or neocmakelsp) |
| Protobuf | buf lsp serve | protols | buf.yaml, buf.work.yaml, .git | Install 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
- LSP & Edit Verification Gate — actions, fail-closed
check, multi-DBclangd, and~/.kompile/lsp-servers.jsonoverrides - Local Code Index & Code Graph — zero-install offline indexing and call/impact graphs
- File Context, Notes & Activity