Skip to content

Commit 224bbcf

Browse files
committed
fix: user couldn't override vim.o.background in setup
1 parent 542645a commit 224bbcf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

colors/thorn.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
require("thorn").load({
2-
theme = vim.o.background,
2+
style = nil,
33
})

lua/thorn/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ M.version = "2.1.0" -- x-release-please-version
33

44
-- stylua: ignore
55
M.default = {
6-
theme = nil, -- 'light' or 'dark' - defaults to vim.o.background if unset
6+
theme = vim.o.background, -- 'light' or 'dark' - defaults to vim.o.background if unset
77
background = "warm", -- options are 'warm' and 'cold'
88

99
transparent = false, -- transparent background
@@ -28,10 +28,10 @@ M.default = {
2828
on_highlights = function(hl, palette) end, -- apply your own highlights
2929
}
3030

31-
M.config = M.default
31+
M.config = nil
3232

3333
M.setup = function(opts)
34-
M.config = vim.tbl_deep_extend("force", M.config, opts or {})
34+
M.config = vim.tbl_deep_extend("force", {}, M.default, opts or {})
3535
end
3636

3737
M.load = function(opts)

0 commit comments

Comments
 (0)