rust-lang / rust-lang/rust-analyzer

VSCode: Outline will be empty if the file is focused before rust-analyzer is loaded

Open
#11,880 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-vscode C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: 0fe74175e 2022-04-02 nightly

rustc version: rustc 1.59.0 (9d1b2106e 2022-02-23)

After updating VSCode to 1.66.0, I noticed that the Outline will be empty for the first focused file after starting VSCode:
image

It just works after reopening the file, or editing the file to trigger an outline update:
image

On Pylance (Python LSP) it's just fine. The Outline will be automatically updated after the LSP finishes loading.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Reproduce the issue by opening the first focused file in VSCode 1.66 before rust-analyzer finishes loading, then inspect the outline update path; done means the Outline populates automatically when the language server finishes loading, without reopening or editing the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.