@@ -11,9 +11,7 @@ export type RunnableEnvCfg =
11
11
12
12
export class Config {
13
13
readonly extensionId = "rust-lang.rust-analyzer" ;
14
- configureLang :
15
- | { handle : vscode . Disposable ; typingContinueCommentsOnNewline : boolean }
16
- | undefined ;
14
+ configureLang : vscode . Disposable | undefined ;
17
15
18
16
readonly rootSection = "rust-analyzer" ;
19
17
private readonly requiresReloadOpts = [
@@ -45,7 +43,7 @@ export class Config {
45
43
}
46
44
47
45
dispose ( ) {
48
- this . configureLang ?. handle . dispose ( ) ;
46
+ this . configureLang ?. dispose ( ) ;
49
47
}
50
48
51
49
private refreshLogging ( ) {
@@ -89,12 +87,8 @@ export class Config {
89
87
*/
90
88
private configureLanguage ( ) {
91
89
// Only need to dispose of the config if there's a change
92
- if (
93
- this . configureLang &&
94
- this . typingContinueCommentsOnNewline !==
95
- this . configureLang . typingContinueCommentsOnNewline
96
- ) {
97
- this . configureLang . handle . dispose ( ) ;
90
+ if ( this . configureLang ) {
91
+ this . configureLang . dispose ( ) ;
98
92
this . configureLang = undefined ;
99
93
}
100
94
@@ -167,12 +161,9 @@ export class Config {
167
161
] ;
168
162
}
169
163
170
- this . configureLang = {
171
- handle : vscode . languages . setLanguageConfiguration ( "rust" , {
172
- onEnterRules,
173
- } ) ,
174
- typingContinueCommentsOnNewline : this . typingContinueCommentsOnNewline ,
175
- } ;
164
+ this . configureLang = vscode . languages . setLanguageConfiguration ( "rust" , {
165
+ onEnterRules,
166
+ } ) ;
176
167
}
177
168
178
169
// We don't do runtime config validation here for simplicity. More on stackoverflow:
0 commit comments