rust-lang / rust-lang/rust-analyzer

Configuration manual missing non-default variants for `hover.memoryLayout.*` configs

Open Beginner friendly
#18,251 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello, partial issue, partial question.

When configuring my LSP, I noticed that the below configurations show their default values, but do not show other valid values (variants).

I believe there are 3 configurations in the memoryLayout category that are guilty of this.

The config assumes the end user is familiar with common representations of memory. I am sure most are, but maybe explicitness is preferred

Config items without information on variants.

These configs were deemed reasonable around #14918.
#14929 is when they were actually implemented. Interestingly, the latter of those PRs include a json file showing the variants for VSCode settings. Maybe it was forgotten for the reference on the website

If a PR is welcome, I can try to poke at it, I'm very unfamiliar with RA internals. Don't mind learning something new though. If people feel it is not worth the time, feel free to close

AFAICT - Currently, you must search the repo to learn of the possible values. That could feel annoying for a new user to do

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 with the three linked rust-analyzer manual entries for memoryLayout.alignment, memoryLayout.size, and memoryLayout.offset, then inspect the JSON file in PR #14929 for the valid variants. Update the reference documentation so each configuration lists its non-default values, and verify the rendered manual entries show them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.