Language servers
Let real language tools answer go to definition and find references in the Code tab, downloaded by Revue or taken from your system.
The Code tab can already go to definitions and find references with its own index, with nothing installed. A language server (the program your editor uses for a language, such as rust-analyzer or the TypeScript server) gives more precise answers and covers more languages. Revue starts the right one on the code it downloaded, asks it first, and falls back to its own index whenever the server has no answer, fails or is slow.
Language servers are off by default.
Turn them on#
- Open Settings → Language servers (Ctrl+,, Cmd+, on macOS).
- Turn on Use language servers.
- Click the servers you want and pick where each comes from: Bundled, System or Custom. Or click Download on a server's row. Each server stays Off until you pick a source for it.
- Open a repository's Code tab. Revue looks at its files, turns on the servers they call for in that repository, and tells you which.
That's it. A bundled server downloads the first time you look something up in a file of its language, so the very first lookup may be answered by Revue's index while it downloads.
Where a server comes from#
Click a server's row to see its details and pick its source:
| Source | What it means |
|---|---|
| Bundled | Revue downloads a tested version and keeps it updated. The default where a download exists. |
| System | The copy installed on your computer. If it isn't found, the row shows the install command (click to copy) and an Install guide. |
| Custom | A program you pick with Choose…, with your own arguments (empty: the usual ones). |
| Off | Never runs, downloads or connects, in any repository. |
The details also list the files it covers (Files: .rs), a Docs link, and notes about what may not work from downloaded code.
Advanced: where downloads go, and from where
-
Bundled servers go into Revue's data folder, under
language-servers/:System Folder Linux ~/.local/share/revue/language-servers/(or$XDG_DATA_HOME/revue/…)macOS ~/Library/Application Support/revue/language-servers/Windows %APPDATA%\revue\language-servers\ -
Native servers come from their official GitHub release pages (rust-analyzer, clangd, Lua, Marksman, Deno, OmniSharp, glsl_analyzer, wgsl-analyzer, shader-language-server, ols).
-
Servers published on npm are installed with npm from the npm registry, using a private Node.js runtime that Revue downloads once from nodejs.org and shares between them. Revue doesn't use or change a Node.js you have installed.
-
Each download is a pinned version. When an update of Revue pins a newer one, it's downloaded again on next use.
-
Settings → Storage → Language servers lists every download and the shared Node.js with their sizes. A deleted one downloads again when needed, if it's set to Bundled. In a server's details, Delete download does the same for one server.
-
Download all (3) opens a dialog to download servers now instead of on first use. Ticking a server that's off turns it on; ticking one set to System or Custom switches it to Bundled. The dialog shows each download's size and the space it takes.
-
Where no download exists for your system, Bundled isn't offered and System is used.
Advanced: how System finds a server
Revue looks for the server's program on your PATH. Apps started from the desktop often get a shorter PATH than a terminal, so it also looks in ~/.cargo/bin, ~/.deno/bin, ~/.local/bin, ~/.npm-global/bin, ~/.bun/bin, /opt/homebrew/bin and /usr/local/bin.
It looks once. After installing a server, click the refresh button at the top of the list (Look for newly installed system servers).
Supported languages#
| Language | Server | Bundled | Notes |
|---|---|---|---|
| TypeScript / JavaScript | typescript-language-server | Yes (npm) | A repository that installs TypeScript 7 gets its own server instead (unless Custom). Loads the Svelte and Vue plugins where those servers are on (see below). |
| TypeScript / JavaScript in Deno projects | Deno (deno lsp) | Yes | Only for repositories with a deno.json, instead of the TypeScript server. |
Angular (.html, .ts) | Angular language server (ngserver) | Yes (npm) | Only for repositories with an angular.json. |
| Svelte | svelte-language-server | Yes (npm) | Comes with the TypeScript plugin that finds .ts references in .svelte files. |
| Vue | @vue/language-server | Yes (npm) | Templates and styles; the TypeScript server answers in the script part, with Vue's plugin. |
| Astro | @astrojs/language-server | Yes (npm) | |
| CSS / SCSS / Less | vscode-css-language-server | Yes (npm) | |
| HTML | vscode-html-language-server | Yes (npm) | |
| Tailwind CSS | tailwindcss-language-server | Yes (npm) | Asked after CSS and HTML. Needs Tailwind installed in the project, so it rarely finds anything. |
| JSON | vscode-json-language-server | Yes (npm) | |
| YAML | yaml-language-server | Yes (npm) | |
| GraphQL | graphql-lsp | Yes (npm) | Needs a GraphQL config (.graphqlrc, graphql.config.*). |
| Prisma | prisma-language-server | Yes (npm) | |
| Markdown | Marksman | Yes | |
| Rust | rust-analyzer | Yes | |
| C / C++ / Objective-C | clangd | Yes | Downloads for Linux x86-64, macOS and Windows x86-64. |
| PHP | Intelephense | Yes (npm) | |
| Ruby | ruby-lsp | No | Runs on your Ruby. |
| Lua | lua-language-server | Yes | |
| Zig | zls | No | Has to match your Zig version. |
| Swift | sourcekit-lsp | No | Comes with the Swift toolchain or Xcode. |
Shell (.sh, .bash) | bash-language-server | Yes (npm) | |
| GDScript (Godot) | Godot editor | No | Connects to a running Godot editor (port 6005 by default). |
| C# | OmniSharp | Yes | Needs the .NET SDK, and a .sln or .csproj. |
| C# | csharp-ls | No | A .NET tool, asked after OmniSharp. |
| GLSL | glsl_analyzer | Yes | |
| WGSL | wgsl-analyzer | Yes | |
| HLSL (also GLSL, WGSL) | shader-language-server | Yes | Downloads for Linux and Windows only. Asked after the GLSL and WGSL servers. |
| Odin | ols | Yes | |
| Haxe | haxe-language-server | No | Runs on your Haxe installation. |
Python and Go aren't in the list: Revue's own index covers them (with TypeScript, JavaScript and Rust). See Browsing code.
Advanced: when several servers fit one file
- Servers are asked in a fixed order and the first that finds something wins: for a
.cssfile the CSS server, then Tailwind; for C#, OmniSharp, then csharp-ls; for GLSL and WGSL, their own servers, then shader-language-server. - A server that answers "nothing" is trusted: Revue's index then doesn't guess (it would match the word inside strings and comments too), except where the index followed the file's own imports.
- Deno stands in for the TypeScript server in repositories with a
deno.jsonordeno.jsonc. Angular applies only with anangular.json. - In a
.vuefile the TypeScript server (with Vue's plugin) is asked first, then Vue's server. - Servers wait at most 20 s to start, 5 s for a definition, 10 s for references and 1.5 s for highlights. After that Revue's index answers.
Svelte and Vue#
The TypeScript server alone doesn't read .svelte or .vue files, so it wouldn't find where a .ts file's exports are used in components. Like VS Code and Zed, Revue loads the frameworks' plugins into it: typescript-svelte-plugin and @vue/typescript-plugin. Then Find references on a function in api.ts lists the .svelte and .vue files that use it too, and in a .vue file the TypeScript server answers in the <script> part.
- A plugin loads where its framework's server is on in the repository and isn't Off in Settings.
- It comes with that server: Revue's download of it, or (with System or Custom) an npm install next to its program. When a server is downloaded after the TypeScript server started, the TypeScript server starts again with the plugin at the next lookup.
- A repository that installs TypeScript 7 gets its own server, which doesn't load plugins.
- SvelteKit and Nuxt generate part of their TypeScript setup (
.svelte-kit/tsconfig.json,.nuxt/) when the project is built, so it isn't in the repository. Without it, imports through their aliases ($lib/…,~/…) may not resolve; relative imports do.
Advanced: GDScript and Godot
The GDScript server runs inside the Godot editor (Editor Settings → Network → Language Server). Open the project in Godot, and Revue connects to it on 127.0.0.1:6005. With Custom, enter another address (host:port, or just a port). Revue shows Godot not running when nothing answers; Check again looks again after you start Godot.
Per repository#
Revue decides for each repository which servers to use, so a Rust project doesn't start the TypeScript server. The first time you open a repository's Code tab (once its code is on your computer), it looks at the files: the kinds of files it has, and files like package.json, Cargo.toml, tsconfig.json or project.godot that name a framework. The servers it finds are on there, the rest off. A notification says what it turned on:
- Language servers turned on lists them. Change opens the repository's settings.
- Language servers found also lists servers you haven't turned on in Settings yet. Turn on turns those on for every repository that uses them.
To change it, open Settings, pick the repository in the sidebar, and find its Language servers card. Each server there is Default (what detection decided), On or Off. Detect again looks at the files again.
A repository can turn servers on even when Use language servers is off.
Advanced: what detection counts
- Vendored and built folders (
node_modules,vendor,dist,build,target,out,.git,.next,.svelte-kit,.nuxt,.godot,bower_components) and the files in Settings → Ignored files don't count. - JSON, YAML and Markdown count only when they're a real part of the repository, not just a README and CI files.
- Deno, Angular, Tailwind and csharp-ls come only from a marker: a
deno.json, anangular.json, Tailwind in apackage.jsonor stylesheet, and so on. - Detection reads your local clone's file list (
git ls-files, so.gitignoreapplies), or else the code Revue downloaded last. Before any of the repository's code is on your computer, all servers are off there. - Detection runs once per repository. Its results are kept in
settings-cache.json(see below).
In the Code tab#
The right of the file's bar shows an icon for each language server of the open file, with a dot for its state: green running, blue busy, yellow needs a look, red failed, grey stopped or not downloaded. Hover it for a summary, click it for the details:
- each server, whether it's Bundled, System or Custom, its state, when it last answered or failed,
- Restart and Stop for a running server, Start for a stopped one,
- Download, Retry, Check again, Turn on here or Settings, depending on the state,
- whether Revue's own index is ready (Indexed),
- Language server settings.
Stop stops a server for that code only, and it stays stopped (also after you restart Revue) until you click Start. To stop a server everywhere, set it to Off in Settings. Turning off Use language servers stops the running servers, except in repositories that turn servers on in their own settings.
All states
| State | Meaning |
|---|---|
| Running | A server runs for this code. |
| Ready (starts on first lookup) | It can start; the first lookup in the file starts it. |
| Starting… / Restarting… | On its way. |
| Downloading 40% | A bundled server is downloading. |
| Not downloaded | Bundled, not downloaded yet: the first lookup (or Download) starts it. |
| Not installed | System or Custom, and the program wasn't found. |
| Not running / Checking… | A server Revue connects to (Godot) doesn't answer, or Revue is still checking. |
| Failed | Its download or start failed; the details say why. |
| Deno answers instead | Another server stands in for it here. |
| Off in this repository | Off in this repository's settings, or detection didn't find it relevant. Turn on here turns it on. |
| Turned off | Off in Settings → Language servers. |
| Stopped | Stopped by hand here. |
Privacy and safety#
Language servers are programs that run on your computer, on Revue's copy of the code. Revue never runs them in your own checkout, even with a local clone: it gives them a separate checkout of the same commit in its cache, because some servers write files next to the code (rust-analyzer runs cargo, which writes target/).
Downloading a bundled server contacts GitHub, nodejs.org and the npm registry. See Privacy and security.
Settings and where they're kept#
| Setting | Where | Default |
|---|---|---|
| Use language servers | Settings → Language servers | Off |
| Each server's source (Bundled, System, Custom, Off) | Settings → Language servers, click the server | Off until picked; Bundled once picked (System where nothing can be downloaded) |
| Custom program and arguments | The server's details | Empty: the usual arguments |
| Per repository: Default, On, Off | Settings → the repository → Language servers | Default (what detection found) |
| Stopped servers | The Code tab's Stop / Start | None |
The Language servers card has a This computer / Shared switch, like other settings that can sync. See Files, sync and settings for one computer.
Advanced: settings-cache.json
What Revue found out on its own about this computer is kept apart from your settings, in settings-cache.json in Revue's cache folder (~/.cache/revue/ on Linux, ~/Library/Caches/revue/ on macOS, %LOCALAPPDATA%\revue\ on Windows):
- which servers detection found for each repository, and why ("40 .tsx files"),
- which servers you stopped, per checkout folder.
It's never synced. Deleting it is safe: detection runs again the next time you open each repository's Code tab.
A Custom program's path isn't included in exported settings, since it's a path on this computer.
Troubleshooting#
- Nothing changes after turning them on. Check the server isn't Off in Settings and that the repository has it on (the Code tab's popover says Off in this repository otherwise; click Turn on here). Before a repository's code is on your computer, detection hasn't run and all its servers are off.
- "… not installed". With System, install the server (the row shows the command) and click the refresh button, or switch to Bundled.
- "… failed". Open the popover or the server's details for the error. Retry downloads again; Restart starts the server again.
- A server finds nothing in libraries. Downloaded code has no dependencies installed, so library types and definitions are unknown. Servers know the repository's own code.
- Lookups are slow the first time. The server is starting or downloading. Revue's index answers meanwhile, and the server takes over once it's ready.
- References of a
.tsexport miss.svelteor.vuefiles. The Svelte (or Vue) server has to be on in the repository and not Off in Settings: its plugin comes with it. With System or Custom, install the plugin next to it (npm install -g typescript-svelte-plugin,npm install -g @vue/typescript-plugin). A repository that installs TypeScript 7 doesn't load plugins. - Tailwind classes don't resolve. That's a limit of the Tailwind server on downloaded code.
More in Troubleshooting and FAQ.