feat: allows override default colors

This commit is contained in:
gbprod
2024-10-02 13:47:45 +02:00
parent b3d53bffd8
commit f6baf9ea9c
3 changed files with 13 additions and 5 deletions
+3
View File
@@ -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
View File
@@ -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,
}
+2
View File
@@ -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