mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-14 06:15:27 +00:00
Refactor config
This commit is contained in:
parent
76f283108b
commit
0849f7001c
2 changed files with 6 additions and 7 deletions
|
@ -43,14 +43,12 @@ export class Config {
|
|||
private prevEnhancedTyping: null | boolean = null;
|
||||
private prevCargoFeatures: null | CargoFeatures = null;
|
||||
|
||||
constructor() {
|
||||
vscode.workspace.onDidChangeConfiguration(_ =>
|
||||
this.userConfigChanged(),
|
||||
);
|
||||
this.userConfigChanged();
|
||||
constructor(ctx: vscode.ExtensionContext) {
|
||||
vscode.workspace.onDidChangeConfiguration(_ => this.refresh(), ctx.subscriptions);
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
userConfigChanged() {
|
||||
private refresh() {
|
||||
const config = vscode.workspace.getConfiguration('rust-analyzer');
|
||||
|
||||
let requireReloadMessage = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue