Personal Nix setup
at main 5.8 kB view raw
1{ pkgs, ... } @ inputs: 2 3let 4 inherit (import ../../../lib/colors.nix inputs) colors mkZedStyles; 5 6 raw = let 7 element = colors.element.gui; 8 cursor = colors.cursor.gui; 9 gutter = colors.gutter.gui; 10 split = colors.split.gui; 11 12 black = colors.black.gui; 13 grey = colors.grey.gui; 14 red = colors.red.gui; 15 brightRed = colors.brightRed.gui; 16 green = colors.green.gui; 17 brightGreen = colors.brightGreen.gui; 18 yellow = colors.yellow.gui; 19 orange = colors.orange.gui; 20 blue = colors.blue.gui; 21 brightBlue = colors.brightBlue.gui; 22 pink = colors.pink.gui; 23 magenta = colors.magenta.gui; 24 aqua = colors.aqua.gui; 25 cyan = colors.cyan.gui; 26 white = colors.white.gui; 27 muted = colors.muted.gui; 28 29 attribute = magenta; 30 keyword = magenta; 31 define = magenta; 32 macro = magenta; 33 label = magenta; 34 35 property = pink; 36 constant = pink; 37 operator = pink; 38 tag = pink; 39 40 url = brightBlue; 41 include = brightBlue; 42 43 delimiter = cyan; 44 typedef = yellow; 45 type = aqua; 46 conditional = red; 47 special = orange; 48 string = green; 49 specialChar = brightGreen; 50 number = orange; 51 function = blue; 52 identifier = white; 53 structure = yellow; 54 in { 55 players = [ 56 { 57 cursor = white; 58 selection = cursor; 59 } 60 ]; 61 62 syntax = { 63 attribute.color = attribute; 64 constant.color = constant; 65 keyword.color = keyword; 66 "keyword.type".color = structure; 67 "constant.builtin".color = special; 68 "constant.macro".color = define; 69 string.color = green; 70 "string.escape".color = specialChar; 71 "string.special".color = specialChar; 72 number.color = number; 73 "number.float".color = number; 74 function.color = function; 75 "function.builtin".color = special; 76 "function.macro".color = macro; 77 "function.method".color = function; 78 "function.parameter".color = function; 79 variable.color = identifier; 80 "variable.parameter".color = identifier; 81 "variable.parameter.builtin".color = special; 82 "variable.member".color = property; 83 "variable.builtin".color = special; 84 "attribute.builtin".color = special; 85 label.color = label; 86 operator.color = operator; 87 conditional.color = conditional; 88 include.color = include; 89 boolean.color = conditional; 90 type.color = type; 91 "type.definition".color = typedef; 92 "type.builtin".color = special; 93 module.color = identifier; 94 tag.color = tag; 95 "tag.builtin".color = special; 96 constructor.color = structure; 97 "markup.raw".color = string; 98 "markup.list".color = operator; 99 "markup.link.label".color = delimiter; 100 "string.special.url".color = url; 101 "punctuation.bracket".color = operator; 102 "punctuation.delimiter".color = delimiter; 103 "punctuation.special".color = specialChar; 104 "keyword.exception".color = conditional; 105 "keyword.return".color = conditional; 106 "keyword.conditional".color = conditional; 107 "keyword.repeat".color = conditional; 108 "keyword.operator".color = operator; 109 "keyword.import".color = include; 110 "property".color = property; 111 112 comment = { 113 color = muted; 114 font_style = "italic"; 115 }; 116 117 "comment.todo".color = brightBlue; 118 "comment.error".color = brightRed; 119 "comment.note".color = magenta; 120 }; 121 }; 122 123 style = with colors; mkZedStyles { 124 background = black; 125 drop_target.background = element; 126 127 editor = { 128 background = black; 129 foreground = white; 130 invisible = grey; 131 gutter.background = black; 132 active_line.background = gutter; 133 active_line_number = muted; 134 line_number = grey; 135 document_highlight = { 136 read_background = element; 137 write_background = element; 138 }; 139 }; 140 141 subheader.background = black; 142 status_bar.background = black; 143 panel.background = black; 144 elevated_surface.background = element; 145 tab_bar.background = black; 146 title_bar.background = black; 147 148 toolbar = { 149 background = black; 150 }; 151 152 tab = { 153 active_background = black; 154 inactive_background = gutter; 155 }; 156 157 search.match_background = blue; 158 159 text = { 160 base = white; 161 muted = muted; 162 accent = blue; 163 disabled = grey; 164 placeholder = cursor; 165 }; 166 167 border = { 168 base = split; 169 variant = gutter; 170 }; 171 172 scrollbar = { 173 track.background = black; 174 thumb.background = muted; 175 }; 176 177 error = red; 178 hint = brightBlue; 179 info = blue; 180 predictive = grey; 181 renamed = yellow; 182 success = green; 183 unreachable = brightRed; 184 warning = orange; 185 186 conflict = red; 187 created = green; 188 deleted = brightRed; 189 hidden = muted; 190 ignored = grey; 191 modified = blue; 192 193 element = { 194 background = element; 195 hover = cursor; 196 selected = cursor; 197 }; 198 199 terminal = { 200 background = black; 201 bright_foreground = grey; 202 dim_foreground = gutter; 203 ansi = { 204 black = black; 205 bright_black = grey; 206 red = red; 207 bright_red = brightRed; 208 green = green; 209 bright_green = brightGreen; 210 yellow = yellow; 211 bright_yellow = orange; 212 blue = blue; 213 bright_blue = brightBlue; 214 magenta = pink; 215 bright_magenta = magenta; 216 cyan = aqua; 217 bright_cyan = cyan; 218 white = white; 219 bright_white = muted; 220 }; 221 }; 222 }; 223in { 224 system-theme = { 225 "$schema" = "https://zed.dev/schema/themes/v0.2.0.json"; 226 name = "System"; 227 author = "@kitten"; 228 themes = let 229 theme = { 230 name = "System Dark"; 231 appearance = "dark"; 232 style = style // raw; 233 }; 234 in [ theme ]; 235 }; 236} 237