configuration/common/vscode.nix
2022-06-22 10:29:27 -07:00

229 lines
9.2 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

let
dictionary = import ./dictionary.nix;
palette = import ./palette.nix;
monospace = {
"editor.fontFamily" = "'Iosevka Custom Mono'";
"editor.wrappingStrategy" = "simple";
};
in
{
# Application
"breadcrumbs.enabled" = false;
"editor.acceptSuggestionOnCommitCharacter" = false;
"editor.acceptSuggestionOnEnter" = "off";
"editor.copyWithSyntaxHighlighting" = false;
"editor.cursorSurroundingLines" = 10;
"editor.dragAndDrop" = false;
"editor.fontFamily" = "'Iosevka Custom Proportional'";
"editor.fontLigatures" = true;
"editor.fontSize" = 15;
"editor.glyphMargin" = false;
"editor.linkedEditing" = true;
"editor.minimap.enabled" = false;
"editor.multiCursorModifier" = "ctrlCmd";
"editor.suggest.localityBonus" = true;
"editor.unfoldOnClickAfterEndOfLine" = true;
"editor.wrappingStrategy" = "advanced";
"explorer.confirmDelete" = false;
"markdown.preview.linkify" = false;
"markdown-checkboxes.enable" = false;
"security.workspace.trust.banner" = "never";
"terminal.integrated.fontFamily" = "'Iosevka Custom Term'";
"window.customMenuBarAltFocus" = false;
"window.enableMenuBarMnemonics" = false;
"window.titleBarStyle" = "custom";
"window.titleSeparator" = " · ";
"workbench.activityBar.visible" = false;
"workbench.colorTheme" = "Monokai";
"workbench.editor.closeEmptyGroups" = false;
"workbench.editor.tabCloseButton" = "off";
"workbench.editor.untitled.hint" = "hidden";
"workbench.enableExperiments" = false;
"workbench.iconTheme" = "material-icon-theme";
"workbench.sideBar.location" = "right";
"workbench.startupEditor" = "none";
"workbench.tips.enabled" = false;
# Formatting
"editor.tabSize" = 2;
"files.insertFinalNewline" = true;
"html.format.endWithNewline" = true;
"html.format.extraLiners" = "";
"html.format.indentInnerHtml" = true;
# Version control
"git.alwaysShowStagedChangesResourceGroup" = true;
"git.enableStatusBarSync" = false;
"git.showUnpublishedCommitsButton" = "never";
"git.suggestSmartCommit" = false;
# Colors
"workbench.colorCustomizations" = {
# "activitybarbadge.background" = "#ff7042";
# "editor.selectionhighlightbackground" = "#54320a";
# "editorsuggestwidget.highlightforeground" = "#ff7042";
# "list.activeselectionforeground" = "#ff7042";
# "list.highlightforeground" = "#ff7042";
# "list.inactiveselectionforeground" = "#ff7042";
# "pickergroup.foreground" = "#ff7042";
# "progressbar.background" = "#ff7042";
# "scrollbarslider.activebackground" = "#ff704250";
# "tab.activeborder" = "#ff7042";
# "tab.inactivebackground" = "#1e1f1c";
# "textlink.foreground" = "#ff7042";
"terminal.foreground" = palette.white;
"terminal.background" = palette.black;
"terminal.ansiblack" = palette.dark-gray;
"terminal.ansired" = palette.red;
"terminal.ansigreen" = palette.green;
"terminal.ansiyellow" = palette.yellow;
"terminal.ansiblue" = palette.blue;
"terminal.ansimagenta" = palette.orange;
"terminal.ansicyan" = palette.purple;
"terminal.ansiwhite" = palette.white;
"terminal.ansibrightblack" = palette.gray;
"terminal.ansibrightred" = palette.red;
"terminal.ansibrightgreen" = palette.green;
"terminal.ansibrightyellow" = palette.yellow;
"terminal.ansibrightblue" = palette.blue;
"terminal.ansibrightmagenta" = palette.orange;
"terminal.ansibrightcyan" = palette.purple;
"terminal.ansibrightwhite" = palette.white;
"tab.inactiveBackground" = palette.black;
"editorGroupHeader.tabsBackground" = palette.black;
"editorGutter.addedBackground" = palette.purple;
"editorGutter.deletedBackground" = palette.purple;
"editorGutter.modifiedBackground" = palette.purple;
"editorOverviewRuler.addedForeground" = palette.purple;
"editorOverviewRuler.deletedForeground" = palette.purple;
"editorOverviewRuler.modifiedForeground" = palette.purple;
"gitDecoration.modifiedResourceForeground" = palette.purple;
"gitDecoration.untrackedResourceForeground" = palette.dark-purple;
"editorMarkerNavigationWarning.background" = palette.orange;
"editorOverviewRuler.warningForeground" = palette.orange;
"editorWarning.foreground" = palette.orange;
"list.warningForeground" = palette.orange;
"sideBar.border" = "#00000000";
"statusBar.border" = "#00000000";
"titleBar.border" = "#00000000";
"editor.findMatchHighlightBackground" = "#00000000";
"editor.findMatchHighlightBorder" = "#aaaaaa";
"editor.selectionHighlightBackground" = "#464646";
"editorError.foreground" = palette.dark-red;
"editorMarkerNavigationError.background" = palette.dark-red;
"editorOverviewRuler.errorForeground" = palette.dark-red;
"gitDecoration.conflictingResourceForeground" = palette.dark-red;
"inputValidation.errorBackground" = palette.dark-red;
"list.errorForeground" = palette.dark-red;
"list.invalidItemForeground" = palette.dark-red;
};
"editor.tokenColorCustomizations" = {
"textMateRules" = [
{ "scope" = "constant.numeric"; "settings" = { "foreground" = palette.yellow; }; }
{ "scope" = "constant.other.caps"; "settings" = { "foreground" = palette.light-gray; }; }
{ "scope" = "entity.name.function.macro"; "settings" = { "foreground" = palette.blue; }; }
{ "scope" = "entity.name.namespace"; "settings" = { "foreground" = palette.purple; }; }
{ "scope" = "entity.name.type.lifetime"; "settings" = { "foreground" = palette.orange; "fontStyle" = "italic"; }; }
{ "scope" = "entity.name.type.numeric"; "settings" = { "foreground" = palette.purple; "fontStyle" = ""; }; }
{ "scope" = "entity.name.type.primitive"; "settings" = { "foreground" = palette.purple; "fontStyle" = ""; }; }
{ "scope" = "entity.name.type"; "settings" = { "foreground" = palette.purple; "fontStyle" = "underline"; }; }
{ "scope" = "keyword.operator.access.dot"; "settings" = { "foreground" = palette.light-gray; }; }
{ "scope" = "keyword.operator.attribute"; "settings" = { "foreground" = palette.blue; }; }
{ "scope" = "keyword.operator.borrow"; "settings" = { "foreground" = palette.orange; }; }
{ "scope" = "keyword.operator.namespace"; "settings" = { "foreground" = palette.light-gray; }; }
{ "scope" = "meta.attribute"; "settings" = { "foreground" = palette.blue; }; }
{ "scope" = "meta.interpolation"; "settings" = { "foreground" = palette.light-gray; }; }
{ "scope" = "punctuation.brackets.angle.rust, keyword.operator.namespace.rust"; "settings" = { "foreground" = palette.purple; }; }
{ "scope" = "punctuation.definition.interpolation"; "settings" = { "foreground" = palette.red; }; }
{ "scope" = "punctuation.definition.lifetime"; "settings" = { "foreground" = palette.orange; "fontStyle" = "italic"; }; }
{ "scope" = "storage.type"; "settings" = { "foreground" = palette.red; "fontStyle" = ""; }; }
{ "scope" = "storage.modifier"; "settings" = { "foreground" = palette.orange; }; }
{ "scope" = "variable.language.self, variable.language.super"; "settings" = { "foreground" = palette.purple; "fontStyle" = "italic"; }; }
];
};
# Language-specific
"[diff]" = monospace;
"[git-commit]" = monospace // {
"editor.rulers" = [50 72];
};
"[html]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[javascript]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[json]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[jsonc]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[markdown]" = monospace // {
"editor.tabSize" = 4;
};
"[plaintext]" = monospace;
"[ruby]" = monospace;
"[typescript]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[typescriptreact]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[yaml]" = monospace;
# Highlights
"highlight.decorations" = { "rangeBehavior" = 1; };
"highlight.regexFlags" = "g";
"highlight.regexes" = {
"(TODO)" = { "decorations" = [{
"color" = palette.red;
"fontStyle" = "italic";
"fontWeight" = "bold";
"overviewRulerColor" = palette.red;
}]; };
"(\\t)" = { "decorations" = [{
"after" = {
"contentText" = "";
"backgroundColor" = palette.white;
"margin" = "0 1px 0 -3px";
"width" = "2px";
};
}]; };
"([\\u00a0\\u00ad\\u115f\\u2000-\\u200e\\u202f\\u205f\\u2060-\\u2061\\u2800\\u3000\\u3164\\ufeff\\uffa0])" = { "decorations" = [ {
"backgroundColor" = "${palette.purple}66";
"border" = "1px solid ${palette.purple}";
}]; };
"([^\\s|#/]|[^/]/)( {2,})([^\\s|])" = { "decorations" = [{} {
"backgroundColor" = "${palette.white}33";
"overviewRulerColor" = "${palette.white}33";
} {}]; };
};
# Environment
"files.exclude" = {
"**/.direnv" = true;
"**/.parcel-cache" = true;
"**/.vscode" = true;
"**/node_modules" = true;
};
"rust-client.disableRustup" = true;
"shellcheck.disableVersionCheck" = true;
# Icons
"material-icon-theme.files.associations" = {
"*.🡕" = "Http";
".envrc" = "Tune";
};
"material-icon-theme.folders.associations" = {
"[post]" = "Docs";
"endpoints" = "Routes";
"migration" = "Database";
"site" = "Public";
};
# Spelling
"cSpell.minWordLength" = 2;
"cSpell.userWords" = dictionary.terms;
}