rust-lang / rust-lang/rust-analyzer

Display function return type for auto completion suggestions

Open
#6,058 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently I mainly use CLion with the Rust plugin when programming in Rust, but every now and then I try out Rust Analyzer. One thing that is holding me back from switching is the fact that CLion shows the return type of functions:

image

This is how the auto complete suggestions look like using Rust Analyzer:

image

As far as I am aware it is not possible to display the return types with Rust Analyzer, so it'd be amazing if this feature could be added.

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 file or test is identified in the issue. Start by locating Rust Analyzer's completion implementation and the rendering of function signatures, then compare the current suggestions with the return-type examples in the screenshots. Done means function completion suggestions visibly include their return types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience
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.