Configuration manual missing non-default variants for `hover.memoryLayout.*` configs
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
It looks like the manual doesn't document variants for any config option, not just these. It doesn't look easily fixable, because the only place we have descriptions for the variants is in the enumDescriptions for the package.json: https://github.com/rust-lang/rust-analyzer/blob/0fb804acb375b02a3beeaceeb75b71969ef37b15/crates/rust-analyzer/src/config.rs#L3307-L3311
Hmm that's unfortunate. Maybe a decent half-measure exists by just stating where each variant can be found.
It's possible that this issue can just be ignored. I feel anyone that is tinkering with their lsp config outside of their editor's blanket is willing to go searching for the answers.
FWIW my editor does show the variants through a plugin (neovim with Mason). So maybe it is fine as it is.
A maintainer can weigh in / close this if they feel there are more pressing matters