feat: first implementation for issues and pull requests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user