diff --git a/README.md b/README.md index 9f03222..1e5cb7c 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,15 @@ local dn = require('dark_notify') -- Configure dn.run({ - schemes { + schemes = { -- you can use a different colorscheme for each dark = "dark colorscheme name", -- even a different `set background=light/dark` setting or lightline theme + -- if you use lightline, you may want to configure lightline themes, + -- even if they're the same one, especially if the theme reacts to :set bg light = { - name = "light scheme name", - background = "either light or dark", + colorscheme = "light scheme name", + background = "override to either light or dark", lightline = "set your lightline theme name here" } }, diff --git a/lua/dark_notify.lua b/lua/dark_notify.lua index 3d69e1a..fef32b6 100644 --- a/lua/dark_notify.lua +++ b/lua/dark_notify.lua @@ -27,13 +27,13 @@ end function apply_mode(mode) local config = get_config() local sel = config.schemes[mode] or {} - local name = sel.name or nil + local colorscheme = sel.colorscheme or nil local bg = sel.background or mode local lltheme = sel.lightline or nil vim.api.nvim_command('set background=' .. bg) - if name ~= nil then - vim.api.nvim_command('colorscheme ' .. name) + if colorscheme ~= nil then + vim.api.nvim_command('colorscheme ' .. colorscheme) end -- now try to reload lightline @@ -147,7 +147,7 @@ function run(config) for _, mode in pairs({ "light", "dark" }) do if type(schemes[mode]) == "string" then - schemes[mode] = { name = schemes[mode] } + schemes[mode] = { colorscheme = schemes[mode] } end end @@ -180,8 +180,8 @@ return { -- lightline_loaders = { -- my_colorscheme = "path_to_my_colorscheme's lightline autoload file" -- }, --- schemes { +-- schemes = { -- dark = "dark colorscheme name", --- light = { name = "light scheme name", background = "optional override, either light or dark" } +-- light = { colorscheme = "light scheme name", background = "optional override, either light or dark" } -- } -- })