feat: first implementation for issues and pull requests

This commit is contained in:
2024-12-29 20:50:50 +01:00
parent dd6843091b
commit f46f60b723
13 changed files with 1248 additions and 859 deletions

View File

@@ -1,22 +1,9 @@
local Config = {}
local M = {}
-- 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
M.default_config = {
base_url = nil, -- The plugin attempts to detect from .git config or prompt if not set
token_file = vim.fn.stdpath('config') .. '/.gitea_token',
preview_style = "floating", -- or "split"
}
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
return M