mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix: Add config and capability for test explorer
This commit is contained in:
parent
52d8ae791d
commit
1c6d1b4f2a
7 changed files with 41 additions and 12 deletions
|
@ -372,13 +372,18 @@ export async function createClient(
|
|||
);
|
||||
|
||||
// To turn on all proposed features use: client.registerProposedFeatures();
|
||||
client.registerFeature(new ExperimentalFeatures());
|
||||
client.registerFeature(new ExperimentalFeatures(config));
|
||||
client.registerFeature(new OverrideFeatures());
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
class ExperimentalFeatures implements lc.StaticFeature {
|
||||
private readonly testExplorer: boolean;
|
||||
|
||||
constructor(config: Config) {
|
||||
this.testExplorer = config.testExplorer || false;
|
||||
}
|
||||
getState(): lc.FeatureState {
|
||||
return { kind: "static" };
|
||||
}
|
||||
|
@ -391,6 +396,7 @@ class ExperimentalFeatures implements lc.StaticFeature {
|
|||
colorDiagnosticOutput: true,
|
||||
openServerLogs: true,
|
||||
localDocs: true,
|
||||
testExplorer: this.testExplorer,
|
||||
commands: {
|
||||
commands: [
|
||||
"rust-analyzer.runSingle",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue