1.7 KiB
1.7 KiB
gitea.nvim
gitea.nvim allows you to manage Gitea issues and pull requests from Neovim, inspired by octo.nvim.
Features
- Stores a Gitea token securely, optionally adding it to
.gitignore. - Tries to auto-detect the Gitea host from your
.git/configor prompts for it. - List, open, comment, and create issues.
- List, open, comment, and merge pull requests.
- Create a local Git branch for an issue.
Installation
Using packer.nvim:
use {
'youruser/gitea.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('gitea').setup()
end
}
Configuration
require('gitea').setup({
base_url = "https://gitea.example.com",
token_file = vim.fn.stdpath('config') .. "/.gitea_token",
preview_style = "floating", -- or "split"
})
Usage (Commands)
:GiteaListIssues <owner> <repo>:GiteaOpenIssue <owner> <repo> <issue_number>:GiteaCreateIssue <owner> <repo> <title> <body...>:GiteaListComments <owner> <repo> <issue_number>:GiteaAddComment <owner> <repo> <issue_number> <comment...>:GiteaCreateBranchForIssue <owner> <repo> <issue_number>:GiteaListPRs <owner> <repo>:GiteaOpenPR <owner> <repo> <pr_number>:GiteaCommentPR <owner> <repo> <pr_number> <comment...>:GiteaMergePR <owner> <repo> <pr_number>
Common Issues
- Circular Dependency: Previously,
commands.luarequiredinit.luawhileinit.luarequiredcommands.lua. The updated approach removes that loop by passing the plugin’s table tocommands.setup_commands.
License
MIT License