diff --git a/README.md b/README.md index c16913a..9898ca4 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ The configuration is strictly modular: - **Lualine**: Statusline with Git diff and line-by-line Gitsigns blame. - **Noice**: Modern UI for cmdline (popup), messages, and LSP hover. - **Snacks**: High-performance dashboard, explorer, and pickers. +- **Snacks-tea**: Gitea/Forgejo extension for Snacks (via the `tea` CLI) — Pull Request picker, review, and creation UI, mirroring the built-in GitHub PR/issue integration. - **Nvim-web-devicons**: Consistent icons across UI components. ### Editing & Navigation @@ -77,6 +78,7 @@ To ensure all features (pickers, formatters, and LSPs) work correctly, the follo - `fzf` (Fuzzy finder fallback) - `lazygit` (Git TUI) - `gh` (GitHub CLI integration) +- `tea` (Gitea/Forgejo CLI integration, for Snacks-tea) - `xclip` / `xsel` (X11) or `wl-copy` (Wayland) for clipboard sync. ### Runtime Environments @@ -90,11 +92,12 @@ To ensure all features (pickers, formatters, and LSPs) work correctly, the follo **Debian / Ubuntu:** ```bash sudo apt install git ripgrep fd-find fzf lazygit gh xclip nodejs npm build-essential curl unzip +# tea: no apt package; install via `go install gitea.com/gitea/tea@latest` or a release binary. ``` **Arch Linux:** ```bash -sudo pacman -S git ripgrep fd fzf lazygit github-cli xclip nodejs npm base-devel curl unzip +sudo pacman -S git ripgrep fd fzf lazygit github-cli tea xclip nodejs npm base-devel curl unzip ``` ## 🚀 Getting Started diff --git a/lua/keymaps.lua b/lua/keymaps.lua index c359120..e9da93d 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -119,6 +119,17 @@ vim.keymap.set("n", "gP", function() Snacks.picker.gh_pr({ state = "all" }) end, { desc = "GitHub Pull Requests (all)" }) +-- Tea (Gitea/Forgejo) +vim.keymap.set("n", "gt", function() + Snacks.tea.pr() +end, { desc = "Tea Pull Requests (open)" }) +vim.keymap.set("n", "gT", function() + Snacks.tea.pr({ state = "all" }) +end, { desc = "Tea Pull Requests (all)" }) +vim.keymap.set("n", "gc", function() + Snacks.tea.pr_create({}) +end, { desc = "Tea Create Pull Request" }) + -- Grep vim.keymap.set("n", "sb", function() Snacks.picker.lines() diff --git a/lua/plugins.lua b/lua/plugins.lua index 81dcb61..f6422e7 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -21,6 +21,11 @@ vim.cmd.colorscheme("catppuccin") -- Eagerly load snacks for dashboard and performance features. vim.pack.add({ { src = "https://github.com/folke/snacks.nvim", name = "snacks" } }) +-- Snacks-tea.nvim +-- Gitea/Forgejo extension for Snacks (adds Snacks.tea, the PR picker/buffer +-- UI). Wraps the `tea` CLI, must be on the runtimepath before snacks.setup(). +vim.pack.add({ { src = "https://github.com/sbulav/snacks-tea.nvim", name = "snacks-tea" } }) + -- Snacks Config -- Store opts in the registry first. Config.plugins.snacks = { @@ -90,6 +95,14 @@ Config.plugins.snacks = { scratch = { enabled = true }, scroll = { enabled = true }, statuscolumn = { enabled = true }, + tea = { + enabled = true, + tea = { + cmd = "tea", -- Path to tea binary + login = nil, -- Specific login to use (nil = auto-detect) + remote = "origin", -- Git remote to use + }, + }, terminal = { enabled = true, win = { diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index daa254a..7244af1 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -140,6 +140,10 @@ "rev": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e", "src": "https://github.com/folke/snacks.nvim" }, + "snacks-tea": { + "rev": "fdbfe05c29a2fab48d4d4feb3e4df0c43f3d4c14", + "src": "https://github.com/sbulav/snacks-tea.nvim" + }, "undotree": { "rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d", "src": "https://github.com/mbbill/undotree"