Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 10f1e95

Browse files
committed
Support custom init options for Rust Analyzer
1 parent d938674 commit 10f1e95

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,12 @@
464464
"default": true,
465465
"description": "Show additional context in hover tooltips when available. This is often the type local variable declaration.",
466466
"scope": "resource"
467+
},
468+
"rust.rust-analyzer": {
469+
"type": "object",
470+
"default": {},
471+
"description": "Settings passed down to rust-analyzer server",
472+
"scope": "resource"
467473
}
468474
}
469475
}

src/rustAnalyzer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,8 @@ export async function createLanguageClient(
203203
// synchronize: { configurationSection: 'rust' },
204204
// Controls when to focus the channel rather than when to reveal it in the drop-down list
205205
revealOutputChannelOn: config.revealOutputChannelOn,
206-
initializationOptions: {
207-
omitInitBuild: true,
208-
cmdRun: true,
209-
},
206+
// TODO: Support and type out supported settings by the rust-analyzer
207+
initializationOptions: vs.workspace.getConfiguration('rust.rust-analyzer'),
210208
};
211209

212210
INSTANCE = new lc.LanguageClient(

0 commit comments

Comments
 (0)