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 M = {}
|
||||||
|
|
||||||
local _opts = {}
|
local config = require('chai.config')
|
||||||
|
|
||||||
--- initializes chai.nvim plugin
|
--- initializes chai.nvim plugin
|
||||||
---@param opts any plugin options
|
---@param opts any plugin options
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
_opts = opts
|
config.setup(opts)
|
||||||
|
|
||||||
print("Hello world")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user