Skip to content

Commit 8479461

Browse files
committed
a
1 parent acab4e7 commit 8479461

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

lua/basics.lua

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ local config = {
2121
-- add sum stuff here
2222
}
2323

24+
function M.setup(opts)
25+
if opts then
26+
config = vim.tbl_deep_extend("force", config, opts)
27+
end
2428

25-
vim.o.tabstop = config.options.tabstop
26-
vim.o.shiftwidth = config.options.shiftwidth
27-
vim.o.nu = config.options.nu
28-
vim.o.relativenumber = config.options.relativenumber
29-
vim.o.clipboard = config.options.clipboard
30-
vim.o.inccommand = config.options.inccommand
31-
vim.o.laststatus = config.options.laststatus
32-
vim.o.wrap = config.options.wrap
33-
vim.o.undofile = config.options.undofile
34-
vim.o.whichwrap = config.options.undofile
29+
if config.enabled then
30+
vim.o.tabstop = config.options.tabstop
31+
vim.o.shiftwidth = config.options.shiftwidth
32+
vim.o.nu = config.options.nu
33+
vim.o.relativenumber = config.options.relativenumber
34+
vim.o.clipboard = config.options.clipboard
35+
vim.o.inccommand = config.options.inccommand
36+
vim.o.laststatus = config.options.laststatus
37+
vim.o.wrap = config.options.wrap
38+
vim.o.undofile = config.options.undofile
39+
vim.o.whichwrap = config.options.undofile
40+
end
41+
end
3542

3643
return M

0 commit comments

Comments
 (0)