Skip to content

Commit 8a98618

Browse files
committed
Accept VSCode font families, before falling back on menlo
1 parent de8f6e7 commit 8a98618

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/extension.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,11 @@ class CsvEditorProvider implements vscode.CustomTextEditorProvider {
390390
console.error('CSV: Error parsing CSV content', error);
391391
result = { data: [] };
392392
}
393-
const fontFamily = config.get<string>('fontFamily', 'Menlo');
393+
/* Prefer csv.fontFamily if set, otherwise fall back to the workspace-wide editor.fontFamily
394+
and finally to a hard-coded Menlo default. */
395+
const fontFamily =
396+
config.get<string>('fontFamily') ||
397+
vscode.workspace.getConfiguration('editor').get<string>('fontFamily', 'Menlo');
394398
const cellPadding = config.get<number>('cellPadding', 4);
395399
const data = result.data as string[][];
396400
const htmlContent = this.generateHtmlContent(data, treatHeader, addSerialIndex, fontFamily);

0 commit comments

Comments
 (0)