(local colors {:bg "#151515" :light_bg "#333333" :light_nt "#555555" :graphite "#888888" :fg "#e8e8d3" :red "#cf6a4c" :yellow "#fad07a" :green "#99ad6a" :skyblue "#8fbfdc" :accent "#ffb964" :selection "#f0a0c0"}) (lambda colors.apply [colorscheme] (import-macros {: setv!} :nvrc.macro.set) (import-macros {: highlight!} :nvrc.macro.color) (vim.api.nvim_create_user_command :SwitchPalette (fn [opts] ((. (require :nvrc.colors) :apply) (. opts.fargs 1))) {:nargs 1}) (setv! jellybeans_overrides {:background {:ctermbg :NONE :256ctermbg :NONE :guibg :NONE}}) (vim.cmd (.. "colorscheme " colorscheme)) ; Statusline (highlight! :StatusLine {:fg (. colors :fg) :bg (. colors :light_bg)}) (highlight! :StatusLineNC {:fg (. colors :graphite) :bg (. colors :bg) :underline true}) (highlight! :StatusLinePad {:fg (. colors :skyblue) :bg (. colors :light_bg)}) (highlight! :StatusLineAccent {:fg (. colors :accent) :bg (. colors :light_bg)}) (highlight! :StatusLineAccentBold {:fg (. colors :accent) :bg (. colors :light_bg) :bold true}) ; SignColumn (highlight! :SignColumn {:bg (. colors :bg)}) ; Completions (highlight! :Pmenu {:fg (. colors :fg) :bg (. colors :light_bg)}) (highlight! :PmenuSel {:fg (. colors :fg) :bg (. colors :light_nt)}) (highlight! :PmenuThumb {:bg (. colors :fg)}) ; LSP (highlight! :DiagnosticError {:fg (. colors :red)}) (highlight! :DiagnosticWarn {:fg (. colors :yellow)}) (highlight! :DiagnosticInfo {:fg (. colors :green)}) (highlight! :DiagnosticHint {:fg (. colors :graphite)}) ; https://github.com/stsewd/tree-sitter-comment/issues/22 (highlight! "@lsp.type.comment" {}) (highlight! :DiagnosticSignError {:fg (. colors :red) :bg (. colors :light_bg)}) (highlight! :DiagnosticSignWarn {:fg (. colors :yellow) :bg (. colors :light_bg)}) (highlight! :DiagnosticSignInfo {:fg (. colors :green) :bg (. colors :light_bg)}) (highlight! :DiagnosticSignHint {:fg (. colors :graphite) :bg (. colors :light_bg)}) (highlight! :WarningMsg {:fg (. colors :yellow)}) ; Leap (highlight! :LeapMatch {:fg (. colors :selection) :underline true :bold true :nocombine true}) (highlight! :LeapLabelPrimary {:fg :black :bg (. colors :selection) :bold true}) (highlight! :LeapLabelSecondary {:fg :black :bg (. colors :accent) :bold true}) ; Treesitter extensions (highlight! "@text.note" {:fg (. colors :skyblue) :bold true}) (highlight! "@text.warning" {:fg (. colors :yellow) :bold true}) (highlight! "@text.danger" {:fg (. colors :red) :bold true})) colors