diff --git a/common/pkgs/bin.nix b/common/pkgs/bin.nix index 1f69928..4286d47 100644 --- a/common/pkgs/bin.nix +++ b/common/pkgs/bin.nix @@ -11,6 +11,22 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-c5iuk1T3x17iEbLAno716pkQkRtVsB0UJzgIrR64Uec="; }; + # Use custom syntax highlighting theme + preBuild = '' + cp ${ + ../../external/paramount-dark.tmTheme + } resources/themes/paramount-dark.tmTheme + + substituteInPlace src/models/pretty.rs \ + --replace "ayu_dark.tmTheme" "paramount-dark.tmTheme" \ + + substituteInPlace static/css/index.css static/css/pretty.css templates/* \ + --replace "#0f1419" "#000000" \ + --replace "#f29718" "#a790d5" \ + --replace "#F29718" "#a790d5" \ + --replace "#be7611" "#8673aa" + ''; + cargoLock = { lockFile = "${src}/Cargo.lock"; }; nativeBuildInputs = [ pkgs.git ]; diff --git a/external/paramount-dark.tmTheme b/external/paramount-dark.tmTheme new file mode 100644 index 0000000..977c852 --- /dev/null +++ b/external/paramount-dark.tmTheme @@ -0,0 +1,247 @@ + + + + + + author + Oskar Wickström + name + paramount-dark + settings + + + settings + + background + #000000 + caret + #292929 + foreground + #C6C6C6 + invisibles + #292929 + lineHighlight + #141414 + selection + #292929 + + + + name + Comment + scope + comment + settings + + foreground + #4E4E4E + + + + name + Foreground + scope + keyword.operator.class, constant.other, source.php.embedded.line + settings + + fontStyle + + foreground + #a6a6a6 + + + + name + Variable, String Link, Regular Expression, Tag Name, GitGutter deleted + scope + variable, support.other.variable, string.other.link, string.regexp, entity.name.tag, entity.other.attribute-name, meta.tag, declaration.tag, markup.deleted.git_gutter + settings + + foreground + #C6C6C6 + + + + name + Number, Constant, Function Argument, Tag Attribute, Embedded + scope + constant.numeric, constant.language, support.constant, constant.character, variable.parameter, punctuation.section.embedded, keyword.other.unit + settings + + fontStyle + + foreground + #a790d5 + + + + name + Class, Support + scope + entity.name.class, entity.name.type.class, support.type, support.class + settings + + fontStyle + + foreground + #C6C6C6 + + + + name + String, Symbols, Inherited Class, Markup Heading, GitGutter inserted + scope + string, constant.other.symbol, entity.other.inherited-class, entity.name.filename, markup.heading, markup.inserted.git_gutter + settings + + fontStyle + + foreground + #a790d5 + + + + name + Operator, Misc + scope + keyword.operator, constant.other.color + settings + + foreground + #767676 + + + + name + Function, Special Method, Block Level, GitGutter changed + scope + entity.name.function, meta.function-call, support.function, keyword.other.special-method, meta.block-level, markup.changed.git_gutter + settings + + fontStyle + + foreground + #C6C6C6 + + + + name + Keyword, Storage + scope + keyword, storage, storage.type + settings + + fontStyle + bold + foreground + #767676 + + + + name + Invalid + scope + invalid + settings + + background + #E32791 + fontStyle + + foreground + #C6C6C6 + + + + name + Separator + scope + meta.separator + settings + + foreground + #C6C6C6 + + + + name + Deprecated + scope + invalid.deprecated + settings + + background + #a790d5 + fontStyle + + foreground + #000000 + + + + name + Diff foreground + scope + markup.inserted.diff, markup.deleted.diff, meta.diff.header.to-file, meta.diff.header.from-file + settings + + foreground + #fafafa + + + + name + Diff insertion + scope + markup.inserted.diff, meta.diff.header.to-file + settings + + background + #123d0f + + + + name + Diff deletion + scope + markup.deleted.diff, meta.diff.header.from-file + settings + + background + + + + + name + Diff header + scope + meta.diff.header.from-file, meta.diff.header.to-file + settings + + foreground + + background + + + + + name + Diff range + scope + meta.diff.range + settings + + fontStyle + italic + foreground + #767676 + + + + uuid + + colorSpaceName + sRGB + +