neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Override palette in config

Open GordianDziwis opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. The heuristics for defining the base palette do not work for my color schema.

Describe the solution you'd like Being able to set the base palette as a config option

Describe alternatives you've considered Hard-code my palette in hl.lua

local function make_palette()
  local bg     = Color.from_hex(get_bg("Normal") or "#151515")
  local fg     = Color.from_hex("#D0D0D0")
  local red    = Color.from_hex("#FF0086")
  local orange = Color.from_hex("#FD8900")
  local yellow = Color.from_hex("#ABA800")
  local green  = Color.from_hex("#00C918")
  local cyan   = Color.from_hex("#1FAAAA")
  local blue   = Color.from_hex("#3777E6")
  local purple = Color.from_hex("#AD00A1")

  local config = require("neogit.config")

  local bg_factor = vim.o.bg == "dark" and 1 or -1
...

GordianDziwis avatar Jun 26 '24 13:06 GordianDziwis

Reasonable enough, sure.

CKolkey avatar Jun 26 '24 15:06 CKolkey

Totally on board with this, somehow the get_fg("Error") in my setup is black instead of red! so Neogit looks weird like this image customizable palette or a configuration to use the default Neogit color palette would be a good idea.

SheffeyG avatar Oct 29 '24 10:10 SheffeyG

Sorry, forgot to document it 😅

You can provide a table to config.highlight to overload any derived colors.

https://github.com/NeogitOrg/neogit/commit/daad0e1b7df8da2260455339f9615c640b19c27d

CKolkey avatar Oct 29 '24 21:10 CKolkey