(import-macros {: common-groups} :earth.macros) (comment "This file was generated by Fennel. Do not modify.") (local theme {}) (macro defcolor [name hex] `(macro ,name [] ,hex)) (defcolor fg "#252F1E") (defcolor bg "#F0EBE1") (defcolor green "#77824A") (defcolor teal "#5F865F") (defcolor orange "#BB7844") (defcolor red "#B3664D") (defcolor op "#669977") (defcolor str "#B3854D") (defcolor cmt "#A09890") (defcolor delim "#80744D") (defcolor altBg "#F5F0E6") (defcolor darkOrange "#B36B42") (defcolor darkGreen "#E2E6D8") (defcolor darkGreenAlt "#B8BE96") (defcolor lightBrown "#D4CAB8") (defcolor diffChange "#675642") (defcolor nonText "#C2BAA8") (defcolor indent "#E2E6D8") (defcolor tablineBg "#E6E0D6") (defcolor altLineNr "#736659") (defcolor ignore "#C8C0B6") (defcolor scroll "#6B6461") (defcolor visual "#DCD4C6") (defcolor diagnosticOk "#77824A") (defcolor diagnosticHint "#A09890") (defcolor diagnosticInfo "#9A8030") (defcolor diagnosticWarn "#BB7844") (defcolor diagnosticError "#B3664D") ;; Light-theme specific diff background colors (defcolor diffAddBg "#CCD8C4") (defcolor diffChangeBg "#D8CEBA") (defcolor diffDeleteBg "#D8C6BE") (macro hl [name & attrs] (let [attr-table {}] (for [i 1 (length attrs) 2] (tset attr-table (. attrs i) (. attrs (+ i 1)))) `(tset theme ,(tostring name) ,attr-table))) (macro ln [name target] `(tset theme ,(tostring name) {:link ,(tostring target)})) ;; Apply all shared highlight groups (common-groups) ;; Theme-specific overrides (hl Error :fg (altBg) :bg (red)) (hl DiffAdd :bg (diffAddBg)) (hl DiffChange :bg (diffChangeBg)) (hl DiffDelete :bg (diffDeleteBg)) (hl FzfLuaBackdrop :fg (nonText)) (hl FzfLuaCursor :fg (altBg) :bg (green)) (hl TodoBgTODO :fg (fg) :bg (darkGreenAlt) :bold true) (hl TodoFgTODO :fg (green)) ; Colorscheme setup (vim.cmd "highlight clear") (vim.cmd "set t_Co=256") (set vim.g.colors_name :lightearth) (set vim.o.background :light) (each [group attr (pairs theme)] (vim.api.nvim_set_hl 0 group attr))