initial commit
This commit is contained in:
22
lua/gitea/config.lua
Normal file
22
lua/gitea/config.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
local Config = {}
|
||||
|
||||
-- Default settings (user can override in setup{})
|
||||
local defaults = {
|
||||
config_file = ".gitea_nvim_token", -- local file containing the token
|
||||
ignore_file = ".gitignore", -- file to which we can append the token file
|
||||
server_url = nil, -- extracted from .git remote if possible
|
||||
}
|
||||
|
||||
Config.values = {}
|
||||
|
||||
function Config.setup(user_opts)
|
||||
for k, v in pairs(defaults) do
|
||||
if user_opts[k] ~= nil then
|
||||
Config.values[k] = user_opts[k]
|
||||
else
|
||||
Config.values[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Config
|
||||
Reference in New Issue
Block a user