Installation
Before anything else, rust-src is mandatory for the project to work correctly,
so don’t forget to run rustup component add rust-src if you’re not sure if you
have it installed.
When you install Rust Glancer, do not forget to turn rust-analyzer off. They should work together just fine (I’ve done that and did not have any conflicts), but it’s kind of meaningless to run both.
VS Code
You have two options:
- Install the extension from the official marketplace.
- Build and install VSIX from the repository.
The extension is maintained and will be updated, but given that VS Code extensions often become targets of attacks nowadays, I’d probably recommend building from source (or at least disabling auto-updates). Please do not forget to update it from time to time though. There will be good things in updates (probably).
Forks (cursor, vscodium, etc)
Install the extension from OpenVSX
Installing from VSIX
- (Optional) Install just
- Clone the repository
- Run
just package-vsix(or go toeditors/codeand build vianpm) - Open VS Code, navigate to extensions tab, click on
...and chooseInstall from VSIX. - Install the extension.
- ???
- PROFIT
Zed
Install the Rust Glancer extension from the marketplace.
Minimal required configuration in settings (you need to disable rust-analyzer, which is enabled by default, and enable Rust Glancer):
"languages": {
"Rust": {
"language_servers": ["rust-glancer", "!rust-analyzer"],
},
}
nvim
There exists a nvim-lspconfig configuration contributed by @h-michael.
It’s also present in mason registry, contributed by @macroexpansion.
Currently I’m not maintaining these, so the pinned version might be outdated. I don’t plan any client changes anytime soon, however, so feel free to grab the prebuilt version from the link below and configure Rust Glancer to use it.
Installing the server
- You can fetch prebuilt binaries on the releases page.
- For windows, there is Scoop support (at the time of writing, 0.3.0).
Other editors
Any editor that supports LSP protocol, should work with Rust Glancer.
Typically all you need is to configure Rust Glancer binary to be the Rust LSP, no special configuration should be required. If you’ll notice any quirks, please create an issue in the repository.
Also, contributions with configuration guides for other editors are welcome (but please make sure that they work; do not submit untested LLM-generated PRs).