diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c72f65d7..e18c95fe 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -36,6 +36,7 @@ [yazi.nvim]: https://github.com/mikavilpas/yazi.nvim [snacks.nvim]: https://github.com/folke/snacks.nvim [oil.nvim]: https://github.com/stevearc/oil.nvim +[hunk.nvim]: https://github.com/julienvincent/hunk.nvim - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. @@ -104,6 +105,8 @@ relevant packages in a simple UI. - This deprecates `vim.useSystemClipboard` as well, see breaking changes section above for migration options. +- Add [hunk.nvim], Neovim plugin & tool for splitting diffs in Neovim. Available + as `vim.git.hunk-nvim` [amadaluzia](https://github.com/amadaluzia): @@ -431,7 +434,7 @@ - Add missing `transparent` option for existing [onedark.nvim](https://github.com/navarasu/onedark.nvim) theme. - + [theutz](https://github.com/theutz): - Added "auto" flavour for catppuccin theme @@ -443,19 +446,21 @@ [neogit]: https://github.com/NeogitOrg/neogit - Add [solarized.nvim] theme with support for multiple variants -- Add [smart-splits.nvim] for navigating between Neovim windows and terminal multiplexer panes. - Available at `vim.utility.smart-splits`. -- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated config. +- Add [smart-splits.nvim] for navigating between Neovim windows and terminal + multiplexer panes. Available at `vim.utility.smart-splits`. +- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated + config. - Fix lualine separator options -- Add [neogit], an interactive and powerful Git interface for Neovim, inspired by Magit +- Add [neogit], an interactive and powerful Git interface for Neovim, inspired + by Magit - Allow deregistering which-key binds or groups by setting them to `null` [justDeeevin](https://github.com/justDeeevin): [supermaven-nvim]: https://github.com/supermaven-inc/supermaven-nvim -- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable` and - `setupOpts` +- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable` + and `setupOpts` [trueNAHO](https://github.com/trueNAHO): @@ -463,9 +468,10 @@ download size. - `flake-utils`'s `systems` inputs follows nvf's `systems` input to transitively - leverage the pattern introduced in commit [fc8206e7a61d ("flake: utilize - nix-systems for overridable flake systems")]( - https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). + leverage the pattern introduced in commit + [fc8206e7a61d ("flake: utilize + nix-systems for overridable flake systems")](https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). [soliprem](https://github.com/soliprem): + - fix broken `neorg` grammars diff --git a/modules/plugins/git/default.nix b/modules/plugins/git/default.nix index 5b30b74a..76bb5786 100644 --- a/modules/plugins/git/default.nix +++ b/modules/plugins/git/default.nix @@ -3,6 +3,7 @@ in { imports = [ ./gitsigns + ./hunk-nvim ./vim-fugitive ./git-conflict ./gitlinker-nvim @@ -14,7 +15,9 @@ in { git integration suite. Enabling this option will enable the following plugins: + * gitsigns + * hunk-nvim * vim-fugitive * git-conflict * gitlinker-nvim diff --git a/modules/plugins/git/hunk-nvim/config.nix b/modules/plugins/git/hunk-nvim/config.nix new file mode 100644 index 00000000..db97d8f7 --- /dev/null +++ b/modules/plugins/git/hunk-nvim/config.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.git.hunk-nvim; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins = { + "hunk-nvim" = { + package = "hunk-nvim"; + setupModule = "gitlinker"; + inherit (cfg) setupOpts; + }; + }; + }; + }; +} diff --git a/modules/plugins/git/hunk-nvim/default.nix b/modules/plugins/git/hunk-nvim/default.nix new file mode 100644 index 00000000..72ce88a0 --- /dev/null +++ b/modules/plugins/git/hunk-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hunk-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/git/hunk-nvim/hunk-nvim.nix b/modules/plugins/git/hunk-nvim/hunk-nvim.nix new file mode 100644 index 00000000..b11ba4ae --- /dev/null +++ b/modules/plugins/git/hunk-nvim/hunk-nvim.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.git.hunk-nvim = { + enable = mkEnableOption "tool for splitting diffs in Neovim [hunk-nvim]" // {default = config.vim.git.enable;}; + setupOpts = mkPluginSetupOption "hunk-nvim" {}; + }; +} diff --git a/npins/sources.json b/npins/sources.json index fd5a34f2..00dcea83 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -692,6 +692,22 @@ "url": "https://github.com/phaazon/hop.nvim/archive/1a1eceafe54b5081eae4cb91c723abd1d450f34b.tar.gz", "hash": "08h18cam2yr57qvfsnf1bra28vbl6013wlchnr5crb757xw8aysa" }, + "hunk-nvim": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "julienvincent", + "repo": "hunk.nvim" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v1.8.0", + "revision": "1e0a4d719c780bb8b0690a54915601508ced321e", + "url": "https://api.github.com/repos/julienvincent/hunk.nvim/tarball/v1.8.0", + "hash": "036cwnswx36m048mvlwa8rr9baclf7lrgjlq065pb4w13c4drbmx" + }, "hydra-nvim": { "type": "GitRelease", "repository": {