Open mcmillion opened 3 years ago
Yes you can overide git diff colors using git
lua table. Reference the lua/onedark/colors.lua for a other possible color override.
require("onedark").setup({
colors = {
git = {
change = "#e0af68",
add = "#109868",
delete = "#9A353D",
conflict = "#bb7a61",
ignore = "#5c6370"
}
}
})
https://github.com/ful1e5/onedark.nvim/blob/38b637026326fec447a2faf5c5294bd0da94a5a5/lua/onedark/colors.lua#L35 https://github.com/ful1e5/onedark.nvim/blob/38b637026326fec447a2faf5c5294bd0da94a5a5/lua/onedark/colors.lua#L54
That's what I was trying, but I'm getting the following on current master:
E5113: Error while calling lua chunk: ...site/pack/packer/start/onedark.nvim/lua/onedark/util.lua:230: bad argument #1 to 'sub' (string expected, got table)
Which is why I was wondering if I'm doing something wrong or maybe I've got something not working with my plugin imports...
@ful1e5 Configuring nested colors using names of a onedark color like 'orange1'
doesn't seem to work:
require("onedark").setup({
colors = {
git = {
add = 'green0',
change = 'orange1',
delete = 'red1',
conflict = '#bb7a61',
ignore = 'fg_gutter',
}
}
})
I get the error color "change" does not exist
.
Here's a full config to reproduce:
I see that we can override colors in the config via:
Is there something similar for changing things like git diffs? Maybe I'm just messing up the syntax (I'm newer to lua in general)?