Skip to content

Commit b057a1d

Browse files
committed
rename variable for clarity
1 parent 6a5d48e commit b057a1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lsptoolshost/autoInsert/onAutoInsert.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,17 @@ async function applyAutoInsertEdit(
152152
}
153153

154154
function 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
}

0 commit comments

Comments
 (0)