Skip to content

Commit

Permalink
vscode: extensive fonts
Browse files Browse the repository at this point in the history
(cherry picked from commit 23d9deb)
  • Loading branch information
Flameopathic authored and danth committed Dec 10, 2024
1 parent d13ffb3 commit f5c12c1
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions modules/vscode/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,27 @@ in {
extensions = [ themeExtension ];
userSettings = {
"workbench.colorTheme" = "Stylix";
"terminal.integrated.fontFamily" = "'${monospace.name}'";
"editor.fontFamily" = "'${monospace.name}'";
"editor.fontFamily" = monospace.name;
"editor.inlayHints.fontFamily" = monospace.name;
"editor.inlineSuggest.fontFamily" = monospace.name;
"scm.inputFontFamily" = monospace.name;
"debug.console.fontFamily" = monospace.name;
"markdown.preview.fontFamily" = sansSerif.name;
"chat.editor.fontFamily" = monospace.name;

# 4/3 factor used for pt to px;
"editor.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5);
"debug.console.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5);
"markdown.preview.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5);
"terminal.integrated.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5);
"chat.editor.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5);

# other factors (9/14, 13/14, 56/14) based on default for given value
# divided by default for `editor.fontSize` (14) from
# https://code.visualstudio.com/docs/getstarted/settings#_default-settings.
"editor.minimap.sectionHeaderFontSize" = builtins.floor (sizes.terminal * 4 / 3 * 9 / 14 + 0.5);
"scm.inputFontSize" = builtins.floor (sizes.terminal * 4 / 3 * 13 / 14 + 0.5);
"screencastMode.fontSize" = builtins.floor (sizes.terminal * 4 / 3 * 56 / 14 + 0.5);
};
};
};
Expand Down

0 comments on commit f5c12c1

Please sign in to comment.