f46f60b7239ba1335376e049c737b265942ebce6
gitea.nvim
A Neovim plugin to manage Gitea issues and pull requests right from your editor, inspired by octo.nvim.
Features
- Browse, open, and edit issues
- Create new issues (including adding labels, assignees, etc.)
- Browse, open, and edit pull requests
- Merge, squash, or rebase pull requests
- Add/modify/delete comments on issues and PRs
- Inline PR reviews and comments
- Add/remove labels, reviewers, assignees, etc.
- And more (mirroring much of octo.nvim’s functionality)
Requirements
- Neovim 0.10+
- plenary.nvim for async utilities
- A running Gitea server
- A Personal Access Token (PAT) for Gitea
Installation
Install using your favorite plugin manager, for example with packer:
use {
"your-username/gitea.nvim",
requires = {"nvim-lua/plenary.nvim"}
}
Setup & First Run
There's no need to store your Gitea server or token directly in your init.lua.
The plugin will:
- Parse your
.git/configto attempt to detect your Gitea server URL (e.g. fromgit config remote.origin.url). - Check for a local token file (by default
.gitea_nvim_token) in your repo directory. - If no token file is found,
gitea.nvimwill prompt you for one. The plugin will then offer to add that token file to your.gitignore(highly recommended).
Example usage in your config:
require("gitea").setup({
-- No need to provide a hostname or token here;
-- but you can override defaults if needed:
-- e.g. config_file = ".my_custom_token_file"
-- or ignore_file = ".my_custom_gitignore"
})
Usage
Once installed and configured, you can use the :Gitea command with subcommands:
:Gitea issue list— Lists issues for the current repo.:Gitea issue create— Opens a scratch buffer to create a new issue.:Gitea issue edit <number>— Opens an issue buffer for<number>.:Gitea pr list— Lists pull requests for the current repo.:Gitea pr edit <number>— Opens a PR buffer for<number>.:Gitea pr merge [commit|rebase|squash] [delete|nodelete]— Merges a PR with the selected method.:Gitea pr create— Creates a new pull request from your current branch to the base branch.- More subcommands (close, reopen, comment, reaction, etc.) will be added similarly to octo.nvim.
When you open an issue or PR buffer, simply edit the title, body, or add new comments. When you save (:w), changes are pushed to Gitea.
Roadmap
- Inline PR reviews (open diff views, comment on lines, etc.)
- Advanced searching and filtering (like
:Gitea issue search <query>) - Further config options (like picking a fuzzy-finder: telescope or fzf-lua)
Contributing
Pull requests and issue reports are welcome! The goal is to replicate and adapt the core octo.nvim workflow for Gitea.
License
Description
Languages
Lua
99.4%
Vim Script
0.6%