Files
gitea.nvim/doc/gitea.nvim.md

58 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# gitea.nvim
**gitea.nvim** allows you to manage [Gitea](https://gitea.io/) issues and pull requests from Neovim,
inspired by [octo.nvim](https://github.com/pwntester/octo.nvim).
## Features
- Stores a Gitea token securely, optionally adding it to `.gitignore`.
- Tries to auto-detect the Gitea host from your `.git/config` or 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](https://github.com/wbthomason/packer.nvim):
```lua
use {
'youruser/gitea.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('gitea').setup()
end
}
```
## Configuration
```lua
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.lua` required `init.lua` while `init.lua` required `commands.lua`.
The updated approach removes that loop by passing the plugins table to `commands.setup_commands`.
## License
MIT License