initial commit

This commit is contained in:
2024-12-23 01:46:04 +01:00
commit c408cd3d24
7 changed files with 886 additions and 0 deletions

22
lua/gitea/config.lua Normal file
View 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