GitHub

TypeScript Intelligence

Loxel runs a dedicated language server per worktree and wires it directly into Monaco. You get hover docs, go-to-definition, completions, rename, and more — isolated per context, with no cross-worktree interference.


Per-worktree language server

Each worktree gets its own language server subprocess. Switching worktrees switches language servers. There is no shared server state between worktrees — if one worktree is using an older TypeScript config or a different version of your packages, it does not affect any other worktree’s language server.


Supported features

FeatureDescription
HoverType information and JSDoc for any symbol
Go-to-definitionJump to the declaration of any symbol
Find referencesList all usages across the project
CompletionsContext-aware autocompletion as you type
RenameRename a symbol and update all references
Code actionsQuick fixes, imports, and refactors
Inlay hintsInline type annotations and parameter names
Signature helpFunction parameter hints while typing a call
Document symbolsSymbol outline for the current file
Folding rangesCollapse functions, blocks, and regions

Cmd+Click on any symbol — or press — to jump to its definition. The target opens in a new editor tab. There is no inline peek; definitions always open as a full tab.


Unused symbols

Symbols flagged as unused by the language server are dimmed in the editor. This uses Monaco’s MarkerTag.Unnecessary — the same visual treatment as VS Code. tsgo emits these diagnostics automatically; no extra configuration required.


Backend selection

The TypeScript language server backend is set with the LOXEL_TS_LSP environment variable:

ValuePackageNotes
tsgo (default)@typescript/native-previewFaster startup
tslstypescript-language-serverAdds semantic token highlighting (more syntax colors)

Set this before starting loxel:

LOXEL_TS_LSP=tsls loxel

Tip: tsls produces richer syntax coloring via semantic tokens — individual local variables, parameters, and type aliases get distinct colors beyond what TextMate grammar rules provide. Use it if you prefer that style; the tradeoff is slightly slower startup compared to tsgo.


Other language servers

Loxel runs language servers for four other languages. Each one is independent of the TypeScript backend.

LanguageWhen it startsFile types
YAMLAlways active (global singleton).yml, .yaml
TerraformFirst .tf, .tfvars, or .hcl file opened.tf, .tfvars, .hcl
DockerFirst dockerfile openeddockerfile, dockerbake
PythonFirst .py or .pyi file opened.py, .pyi

YAML is a singleton that starts with loxel and stays running. The Terraform, Docker, and Python servers are lazy — they spawn the first time you open a matching file and disconnect automatically when no matching files remain open. You do not need to configure anything to get them; they are available whenever you open a supported file type.


See also