Commit 0b725f3
committed
fix: rust-analyzer.imports.granularity.group should get a dropdown UI
VS Code only offers a dropdown if a the toplevel property description
is `enum`. For `anyOf` (a JSON schema feature), we don't get that
helpful UI.
Whilst the previous version marked `preserve` as deprecated, the VS
Code UI didn't do anything special when users chose that value.
Instead, use an enum so we get the helpful dropdown, and just use the
description to highlight the deprecated value.
Relevant docs:
https://code.visualstudio.com/api/references/contribution-points#:~:text=The%20enumDescriptions%20property%20provides%20a,will%20be%20parsed%20as%20Markdown.
https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.2.1.21 parent e31e2b1 commit 0b725f3
File tree
2 files changed
+20
-41
lines changed- src/tools/rust-analyzer
- crates/rust-analyzer/src
- editors/code
2 files changed
+20
-41
lines changedLines changed: 7 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3566 | 3566 | | |
3567 | 3567 | | |
3568 | 3568 | | |
3569 | | - | |
3570 | | - | |
3571 | | - | |
3572 | | - | |
3573 | | - | |
3574 | | - | |
3575 | | - | |
3576 | | - | |
3577 | | - | |
3578 | | - | |
3579 | | - | |
3580 | | - | |
3581 | | - | |
3582 | | - | |
3583 | | - | |
3584 | | - | |
3585 | | - | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
3586 | 3576 | | |
3587 | 3577 | | |
3588 | 3578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2020 | 2020 | | |
2021 | 2021 | | |
2022 | 2022 | | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
2032 | | - | |
2033 | | - | |
2034 | | - | |
2035 | | - | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
2039 | | - | |
2040 | | - | |
2041 | | - | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
2047 | 2036 | | |
2048 | 2037 | | |
2049 | 2038 | | |
| |||
0 commit comments