mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Switch from Vec<InlayKind> to object with props
- Instead of a single object type, use several individual nested types to allow toggling from the settings GUI - Remove unused struct definitions - Install and test that the toggles work
This commit is contained in:
parent
974ed7155a
commit
58248e24cd
11 changed files with 41 additions and 85 deletions
|
@ -10,7 +10,7 @@ export function activateInlayHints(ctx: Ctx) {
|
|||
const maybeUpdater = {
|
||||
updater: null as null | HintsUpdater,
|
||||
onConfigChange() {
|
||||
if (ctx.config.inlayHintOpts.displayType === 'off') {
|
||||
if (!ctx.config.inlayHints.typeHints && !ctx.config.inlayHints.parameterHints) {
|
||||
return this.dispose();
|
||||
}
|
||||
if (!this.updater) this.updater = new HintsUpdater(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue