File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/lsptoolshost/autoInsert Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -152,17 +152,17 @@ async function applyAutoInsertEdit(
152152}
153153
154154function getFormattingOptions ( document : vscode . TextDocument ) : FormattingOptions {
155- const editorConfig = vscode . workspace . getConfiguration ( 'editor' , document ) ;
156- const detectIndentation = editorConfig . get < boolean > ( 'detectIndentation' ) ;
155+ const editorSettings = vscode . workspace . getConfiguration ( 'editor' , document ) ;
156+ const detectIndentation = editorSettings . get < boolean > ( 'detectIndentation' ) ;
157157
158158 const editor = detectIndentation
159159 ? vscode . window . visibleTextEditors . find ( ( e ) => e . document === document )
160160 : undefined ;
161161
162162 // VSCode guarantees that retrieving the editor.options.tabSize will return a number
163- const tabSize = ( editor ?. options . tabSize as number | undefined ) ?? editorConfig . get < number > ( 'tabSize' ) ?? 4 ;
163+ const tabSize = ( editor ?. options . tabSize as number | undefined ) ?? editorSettings . get < number > ( 'tabSize' ) ?? 4 ;
164164 // VSCode guarantees that retrieving the editor.options.insertSpaces will return a boolean
165165 const insertSpaces =
166- ( editor ?. options . insertSpaces as boolean | undefined ) ?? editorConfig . get < boolean > ( 'insertSpaces' ) ?? true ;
166+ ( editor ?. options . insertSpaces as boolean | undefined ) ?? editorSettings . get < boolean > ( 'insertSpaces' ) ?? true ;
167167 return FormattingOptions . create ( tabSize , insertSpaces ) ;
168168}
You can’t perform that action at this time.
0 commit comments