# Stylix-themed program configurations # All programs here are managed via programs..enable for Stylix auto-theming { config, pkgs, lib, ... }: { programs = { # # Terminals # ghostty = { enable = true; settings = { # Font managed by Stylix, but we can override family here # Stylix sets font-size via stylix.fonts.sizes.terminal font-family = "Maple Mono NF"; # Ligatures - Maple Mono NF has full ligature support font-feature = [ "+calt" # contextual alternates "+liga" # standard ligatures ]; window-padding-x = 4; window-padding-y = 4; keybind = [ "ctrl+shift+plus=increase_font_size:1" "shift+enter=text:\\n" ]; }; }; foot = { enable = true; # Stylix handles colors and fonts settings = { main = { pad = "4x4"; }; }; }; # # Editor # helix = { enable = true; # Stylix sets the theme, but we override syntax tokens for minimal highlighting # Philosophy: Only keywords, strings, comments, numbers get color - rest is plain text themes.stylix = { # Inherit Stylix's base theme (UI, palette, etc.) inherits = "stylix"; # Minimal syntax highlighting - only 4 categories get color # Comments - stand out "comment" = { fg = "yellow"; modifiers = ["italic"]; }; # Keywords - highlighted and italic "keyword" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.control" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.directive" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.function" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.operator" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.return" = { fg = "magenta"; modifiers = ["italic"]; }; "keyword.storage" = { fg = "magenta"; modifiers = ["italic"]; }; # Strings - highlighted "string" = "green"; "string.regexp" = "red"; "string.special" = "green"; # Numbers/constants - highlighted "constant.numeric" = "red"; "constant.builtin" = "red"; "constant.character.escape" = "red"; # Functions remain plain text "function" = "text"; "function.builtin" = "text"; "function.method" = "text"; "function.macro" = "text"; # Variables remain plain text "variable" = "text"; "variable.builtin" = "text"; "variable.parameter" = "text"; "variable.other.member" = "text"; # Types get subtle highlight "type" = { fg = "cyan"; modifiers = ["italic"]; }; "type.builtin" = "cyan"; # Top-level definitions get accent "function.definition" = { fg = "text"; modifiers = ["bold"]; }; "type.definition" = { fg = "text"; modifiers = ["bold"]; }; # Everything else plain "constructor" = "text"; "attribute" = "text"; "label" = "text"; "namespace" = "text"; "tag" = "text"; # Punctuation slightly dimmed "punctuation" = { fg = "text"; modifiers = ["dim"]; }; "punctuation.bracket" = { fg = "text"; modifiers = ["dim"]; }; "punctuation.delimiter" = { fg = "text"; modifiers = ["dim"]; }; "punctuation.special" = { fg = "text"; modifiers = ["dim"]; }; "operator" = { fg = "text"; modifiers = ["dim"]; }; # Markup "markup.heading" = { fg = "cyan"; modifiers = ["bold"]; }; "markup.list" = "magenta"; "markup.bold" = { modifiers = ["bold"]; }; "markup.italic" = { modifiers = ["italic"]; }; "markup.strikethrough" = { modifiers = ["crossed_out"]; }; "markup.link.url" = { fg = "blue"; modifiers = ["underlined"]; }; "markup.link.text" = "magenta"; "markup.quote" = "green"; "markup.raw" = "green"; }; settings = { # Standard QWERTY keybindings keys.normal = { # Navigation "S-tab" = "jump_backward"; "C-d" = [ "page_cursor_half_down" "align_view_center" ]; "C-u" = [ "page_cursor_half_up" "align_view_center" ]; # Selection C-s = "split_selection_on_newline"; C-minus = "merge_selections"; C-_ = "merge_consecutive_selections"; "C-;" = "flip_selections"; "C-:" = "ensure_selections_forward"; "C-," = "remove_primary_selection"; # Misc "C-/" = "toggle_comments"; "@" = ":append-output git config get user.email"; space = { B = ":sh git log -n 5 --format='format:%%h (%%an: %%ar) %%s' --no-patch -L%{cursor_line},+1:%{buffer_name}"; x = ":write-buffer-close"; X = ":write-quit-all"; o = ":config-open"; h = "hover"; k = "select_references_to_symbol_under_cursor"; }; g = { "/" = "goto_next_buffer"; "\\" = "goto_previous_buffer"; }; m.m = [ "select_mode" "match_brackets" "normal_mode" ]; }; keys.select = { "C-d" = [ "page_cursor_half_down" "align_view_center" ]; "C-u" = [ "page_cursor_half_up" "align_view_center" ]; g = { "/" = "goto_next_buffer"; "\\" = "goto_previous_buffer"; }; }; editor = { auto-format = true; auto-save = true; bufferline = "always"; color-modes = true; completion-timeout = 5; cursorcolumn = true; cursorline = true; indent-heuristic = "tree-sitter"; line-number = "relative"; rulers = [ 120 ]; text-width = 120; end-of-line-diagnostics = "hint"; cursor-shape = { insert = "bar"; normal = "block"; select = "underline"; }; file-picker.hidden = false; indent-guides.render = true; inline-diagnostics = { cursor-line = "warning"; other-lines = "disable"; prefix-len = 5; max-diagnostics = 1; max-wrap = 30; }; lsp = { display-messages = true; display-inlay-hints = true; }; soft-wrap = { enable = true; max-wrap = 30; }; statusline = { left = [ "mode" "file-modification-indicator" "spinner" "version-control" ]; center = [ "file-name" ]; right = [ "diagnostics" "selections" "register" "position" "file-encoding" ]; mode.normal = "Normal"; mode.insert = "Insert"; mode.select = "Select"; }; whitespace.render = { space = "all"; tab = "all"; tabpad = "all"; newline = "none"; nbsp = "none"; }; whitespace.characters = { space = " "; tab = "⇀"; tabpad = " "; }; }; }; languages = { language = [ { name = "markdown"; language-servers = [ "marksman" ]; } { name = "nix"; language-servers = [ "nil" ]; } { name = "python"; language-servers = [ "pylsp" ]; } ]; language-server.ltex-ls = { command = "ltex-ls"; }; }; }; # # CLI Tools # bat.enable = true; fzf = { enable = true; enableZshIntegration = true; }; btop.enable = true; mpv.enable = true; # # Launcher # wofi.enable = true; }; }