Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

  1. Install the extension from the official marketplace.
  2. 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

  1. (Optional) Install just
  2. Clone the repository
  3. Run just package-vsix (or go to editors/code and build via npm)
  4. Open VS Code, navigate to extensions tab, click on ... and choose Install from VSIX.
  5. Install the extension.
  6. ???
  7. 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

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).