This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
How to configure nested colors (e.g. diffs, etc) #6
Labels
bug
Something isn't working
Comments
Yes you can overide git diff colors using require("onedark").setup({
colors = {
git = {
change = "#e0af68",
add = "#109868",
delete = "#9A353D",
conflict = "#bb7a61",
ignore = "#5c6370"
}
}
}) Permalinksonedark.nvim/lua/onedark/colors.lua Line 35 in 38b6370
onedark.nvim/lua/onedark/colors.lua Line 54 in 38b6370
|
That's what I was trying, but I'm getting the following on current master:
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
added a commit
that referenced
this issue
Jun 23, 2021
🔧 (fix #6) Parse lua table inside `colors` config
@ful1e5 Configuring nested colors using names of a onedark color like require("onedark").setup({
colors = {
git = {
add = 'green0',
change = 'orange1',
delete = 'red1',
conflict = '#bb7a61',
ignore = 'fg_gutter',
}
}
}) I get the error Here's a full config to reproduce: Click to expand-- Ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand('~/.config/nvim'))
vim.opt.packpath:remove(vim.fn.expand('~/.local/share/nvim/site'))
-- Append test directory
local test_dir = vim.fn.expand('~/code-other/nvim-test-config')
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))
-- Install packer
local install_path = test_dir .. '/pack/packer/start/packer.nvim'
local install_plugins = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
vim.cmd('packadd packer.nvim')
install_plugins = true
end
local packer = require('packer')
packer.init({
package_root = test_dir .. '/pack',
compile_path = test_dir .. '/plugin/packer_compiled.lua'
})
packer.startup(function()
function Use(module)
use(require(string.format('configs.%s', module)))
end
-- Packer can manage itself
packer.use 'wbthomason/packer.nvim'
use { 'ful1e5/onedark.nvim', config = function()
require("onedark").setup({
colors = {
git = {
add = 'green0',
change = 'orange1',
delete = 'red1',
conflict = '#bb7a61',
ignore = 'fg_gutter',
}
}
})
end }
if install_plugins then
packer.sync()
else
-- load plugins at your earliest convenience
vim.defer_fn(function()
vim.cmd('doautocmd User LoadPlugins')
end, 1)
end
end)
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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)?
The text was updated successfully, but these errors were encountered: