rust-lang / rust-lang/rust-analyzer
Configuration manual missing non-default variants for `hover.memoryLayout.*` configs
Nobody has claimed this yet.
- 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.
memoryLayout.alignment(Default "Hexadecimal")memoryLayout.size(Default "Both")memoryLayout.offset(Default "Hexadecimal")
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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