mirror of
https://github.com/gbprod/nord.nvim.git
synced 2026-08-24 02:34:16 -05:00
feat: allows override default colors
This commit is contained in:
@@ -136,6 +136,9 @@ require("nord").setup({
|
||||
},
|
||||
},
|
||||
|
||||
-- Override the default colors
|
||||
on_colors = function(colors) end,
|
||||
|
||||
--- You can override specific highlights to use other groups or a hex color
|
||||
--- function will be called with all highlights and the colorScheme table
|
||||
on_highlights = function(highlights, colors) end,
|
||||
|
||||
+8
-5
@@ -1,12 +1,12 @@
|
||||
local config = {}
|
||||
|
||||
local defaults = {
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
diff = { mode = "bg" }, -- [bg|fg]
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
diff = { mode = "bg" }, -- [bg|fg]
|
||||
search = { theme = "vim" }, -- [vim|vscode]
|
||||
borders = true,
|
||||
errors = { mode = "bg" }, -- [bg|fg|none]
|
||||
errors = { mode = "bg" }, -- [bg|fg|none]
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
styles = {
|
||||
comments = { italic = true },
|
||||
@@ -30,7 +30,10 @@ local defaults = {
|
||||
tritan = 0,
|
||||
},
|
||||
},
|
||||
--- You can override specific highlights to use other groups or a hex color
|
||||
-- You can override colors
|
||||
on_colors = function(colors) end,
|
||||
|
||||
-- You can override specific highlights to use other groups or a hex color
|
||||
on_highlights = function(highlights, colors) end,
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ function nord.load(opts)
|
||||
require("nord.colors").daltonize(config.options.colorblind.severity)
|
||||
end
|
||||
|
||||
require('nord.config').options.on_colors(require('nord.colors').palette)
|
||||
|
||||
vim.cmd([[ highlight clear ]])
|
||||
|
||||
if config.options.terminal_colors then
|
||||
|
||||
Reference in New Issue
Block a user