File tree Expand file tree Collapse file tree
src/client/activation/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { IExperimentService } from '../../common/types';
1111import { LanguageServerAnalysisOptionsBase } from '../common/analysisOptions' ;
1212import { ILanguageServerOutputChannel } from '../types' ;
1313import { LspNotebooksExperiment } from './lspNotebooksExperiment' ;
14+ import { traceWarn } from '../../logging' ;
1415
1516const EDITOR_CONFIG_SECTION = 'editor' ;
1617const FORMAT_ON_TYPE_CONFIG_SETTING = 'formatOnType' ;
@@ -79,11 +80,15 @@ export class NodeLanguageServerAnalysisOptions extends LanguageServerAnalysisOpt
7980 editorConfig : WorkspaceConfiguration ,
8081 value : boolean | undefined ,
8182 ) {
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+ }
8893 }
8994}
You can’t perform that action at this time.
0 commit comments