Benefits: - No need to run Mustache, so better performance - Allows the code to be linted and formatted - Generated file is minified - Can use arbitrary variables to name colors and group settings (although this is not implemented) Drawbacks: - Update script is more complex I opted to change the sorting to alphabetical order because it's easier to implement in the update script. The script prints a list of added and removed options, so ordering to match the upstream documentation is not necessary.
29 lines
1.1 KiB
Nix
29 lines
1.1 KiB
Nix
{ config, ... }:
|
|
|
|
with config.stylix.fonts;
|
|
|
|
{
|
|
"workbench.colorTheme" = "Stylix";
|
|
"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" = sizes.terminal * 4.0 / 3.0;
|
|
"debug.console.fontSize" = sizes.terminal * 4.0 / 3.0;
|
|
"markdown.preview.fontSize" = sizes.terminal * 4.0 / 3.0;
|
|
"terminal.integrated.fontSize" = sizes.terminal * 4.0 / 3.0;
|
|
"chat.editor.fontSize" = sizes.terminal * 4.0 / 3.0;
|
|
|
|
# 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" =
|
|
sizes.terminal * 4.0 / 3.0 * 9.0 / 14.0;
|
|
"scm.inputFontSize" = sizes.terminal * 4.0 / 3.0 * 13.0 / 14.0;
|
|
"screencastMode.fontSize" = sizes.terminal * 4.0 / 3.0 * 56.0 / 14.0;
|
|
}
|