joshdick / onedark.vim

A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
MIT License
3.91k stars 529 forks source link

Override colors in lua (neovim) #319

Open pierot opened 2 years ago

pierot commented 2 years ago

Issue Description

I'd like to override the some colors of the theme. I had a config for neovim in vimscript but I'd like to convert this to lua.

I came up with this, but it has no effect.

vim.g.onedark_color_overrides = {
  background = { gui = "#1a1a1a", cterm = "235", cterm16 = "NONE" },
  black = { gui = "#1a1a1a", cterm = "235", cterm16 = "NONE" },
  foreground = { gui = "#f5f7fc", cterm = "145", cterm16 = "15" },
  white = { gui = "#f5f7fc", cterm = "145", cterm16 = "15" },
  blue = { gui = "#32a4ec", cterm = "39", cterm16 = "4" },
  red = { gui = "#f96874", cterm = "204", cterm16 = "1" },
  dark_red = { gui = "#eb6559", cterm = "196", cterm16 = "9" },
  green = { gui = "#a0e470", cterm = "114", cterm16 = "2" },
  yellow = { gui = "#f7ec4a", cterm = "180", cterm16 = "3" },
  purple = { gui = "#d375f0", cterm = "170", cterm16 = "5" },
  cyan = { gui = "#38ebf2", cterm = "38", cterm16 = "6" },
  comment_grey = { gui = "#7b8393", cterm = "59", cterm16 = "7" }
}

vim.o.termguicolors = true
vim.cmd("colorscheme onedark")

What am I missing?