feat: add config system
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
local M = {}
|
||||
|
||||
M.defaults = {
|
||||
servers = {},
|
||||
}
|
||||
|
||||
M.options = {}
|
||||
|
||||
---set configuration
|
||||
---@param opts any plugin configuration
|
||||
function M.setup(opts)
|
||||
-- TODO: Add validation
|
||||
M.options = vim.tbl_deep_extend('force', M.defaults, opts)
|
||||
end
|
||||
|
||||
return M
|
||||
+2
-4
@@ -1,13 +1,11 @@
|
||||
local M = {}
|
||||
|
||||
local _opts = {}
|
||||
local config = require('chai.config')
|
||||
|
||||
--- initializes chai.nvim plugin
|
||||
---@param opts any plugin options
|
||||
function M.setup(opts)
|
||||
_opts = opts
|
||||
|
||||
print("Hello world")
|
||||
config.setup(opts)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user