rust-lang / rust-lang/rust-analyzer

Support completion and for intra-doc links

Open
#8,314 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-completion E-hard S-unactionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

It would be nice to trigger the auto completion pane for identifiers after typing something like [` in a comment.

I tried fiddling with adding backtick to

https://github.com/rust-analyzer/rust-analyzer/blob/1ae20d2b894171f0b8368309da727cd365b95fc1/crates/rust-analyzer/src/caps.rs#L36

but (in vscode at least) it didn't seem to actually trigger the completion pane in a comment, though the backtick worked to force it to open elsewhere. From reading the lsp spec for that configuration, it looks like vscode is doing some detection of identifier characters already to try to decide when to bring up the pane, so maybe is also trying to be smart about not opening the pane inside a comment?

cc @Veykril (since you seem to be the intra-doc link person!)

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

Start by reviewing the completion-trigger configuration in crates/rust-analyzer/src/caps.rs around the referenced line, then compare its behavior with VS Code completion handling inside comments. The change is done when identifier completion can be triggered for intra-doc links in comments, with the behavior verified in VS Code.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.