Language servers
crc talks to five language servers. It does not install them: if one is on your Mac, crc finds it and starts it when the first file of that language opens. One server runs per language per project.
Supported servers
Section titled “Supported servers”| Language | Server | Binary crc looks for |
|---|---|---|
| Rust | rust-analyzer | rust-analyzer |
| Go | gopls | gopls |
| Python | pyright | basedpyright-langserver, then pyright-langserver |
| TypeScript, TSX, JavaScript, JSX | typescript-language-server | typescript-language-server |
| C, C++ | clangd | clangd |
TypeScript, TSX and JavaScript files share one server process.
What you get
Section titled “What you get”- Diagnostics are underlined in the text, with error and warning counts in the status line.
- Find References is in the Go menu.
- Signature help shows the parameters of the call you are typing.
- Format on save: set
format_on_save = truein settings. - Completion from the server is one of several sources; see Completion.
Code actions
Section titled “Code actions”When the caret rests on a line where the server has fixes or refactorings, a lightbulb takes the place of that line’s number. Click it, or press ⌘., to list them in the palette: the server’s preferred fix first, and actions that cannot run here last, with the reason. Type to filter, Return to run one. With a selection, ⌘. asks about the selection.
An action’s edits land in open files as one undo step each, left unsaved; files that are not open are edited on disk.
Organize Imports in the Go menu sorts and prunes the imports of the
whole file, where the server supports it (gopls, typescript-language-server,
and others). To do it on every save, set organize_imports_on_save = true
in settings; with format_on_save too,
imports are organized first, then the file is formatted.
Where crc looks
Section titled “Where crc looks”Apps opened from the Dock see only the system’s default PATH, and crc does
not run your shell to read your profile. So it looks, in order, in:
- Your Rust toolchains,
~/.rustup/toolchains/*/bin, newest first. - The app’s own
PATH. ~/.cargo/bin,~/go/bin,~/.bun/bin,~/Library/pnpm,~/.local/binand~/.npm-global/bin.$PNPM_HOME, when set./opt/homebrew/bin,/usr/local/binand/usr/local/go/bin.