File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/client/activation/node Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { IExperimentService } from '../../common/types';
11
11
import { LanguageServerAnalysisOptionsBase } from '../common/analysisOptions' ;
12
12
import { ILanguageServerOutputChannel } from '../types' ;
13
13
import { LspNotebooksExperiment } from './lspNotebooksExperiment' ;
14
+ import { traceWarn } from '../../logging' ;
14
15
15
16
const EDITOR_CONFIG_SECTION = 'editor' ;
16
17
const FORMAT_ON_TYPE_CONFIG_SETTING = 'formatOnType' ;
@@ -79,11 +80,15 @@ export class NodeLanguageServerAnalysisOptions extends LanguageServerAnalysisOpt
79
80
editorConfig : WorkspaceConfiguration ,
80
81
value : boolean | undefined ,
81
82
) {
82
- await editorConfig . update (
83
- FORMAT_ON_TYPE_CONFIG_SETTING ,
84
- value ,
85
- ConfigurationTarget . Global ,
86
- /* overrideInLanguage */ true ,
87
- ) ;
83
+ try {
84
+ await editorConfig . update (
85
+ FORMAT_ON_TYPE_CONFIG_SETTING ,
86
+ value ,
87
+ ConfigurationTarget . Global ,
88
+ /* overrideInLanguage */ true ,
89
+ ) ;
90
+ } catch ( ex ) {
91
+ traceWarn ( `Failed to set formatOnType to ${ value } ` ) ;
92
+ }
88
93
}
89
94
}
You can’t perform that action at this time.
0 commit comments