Fixed PR comments

Formatting and changelog
This commit is contained in:
Theodor Bjorkman 2025-02-28 19:10:53 +01:00
commit 7f63328de1
4 changed files with 32 additions and 36 deletions

View file

@ -192,3 +192,7 @@
- Add formatters for go: [gofmt](https://go.dev/blog/gofmt), - Add formatters for go: [gofmt](https://go.dev/blog/gofmt),
[golines](https://github.com/segmentio/golines) and [golines](https://github.com/segmentio/golines) and
[gofumpt](https://github.com/mvdan/gofumpt) [gofumpt](https://github.com/mvdan/gofumpt)
[UltraGhostie](https://github.com/UltraGhostie)
- Add [harpoon](https://github.com/ThePrimeagen/harpoon) plugin for navigation

View file

@ -5,8 +5,6 @@
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.lists) optionals;
inherit (lib.strings) concatStrings;
inherit (lib.nvim.binds) pushDownDefault mkKeymap; inherit (lib.nvim.binds) pushDownDefault mkKeymap;
cfg = config.vim.navigation.harpoon; cfg = config.vim.navigation.harpoon;
@ -23,14 +21,6 @@ in {
setupModule = "harpoon"; setupModule = "harpoon";
inherit (cfg) setupOpts; inherit (cfg) setupOpts;
before = ''
'';
after = ''
local harpoon = require("harpoon")
harpoon.setup({})
'';
cmd = ["Harpoon"]; cmd = ["Harpoon"];
keys = [ keys = [

View file

@ -1,4 +1,4 @@
_: { {
imports = [ imports = [
./harpoon.nix ./harpoon.nix
./config.nix ./config.nix

View file

@ -4,29 +4,6 @@
inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.nvim.types) mkPluginSetupOption luaInline; inherit (lib.nvim.types) mkPluginSetupOption luaInline;
inherit (lib.generators) mkLuaInline; inherit (lib.generators) mkLuaInline;
setupOptions = {
defaults = {
save_on_toggle = mkOption {
description = "any time the ui menu is closed then we will save the state back to the backing list, not to the fs";
type = bool;
default = false;
};
sync_on_ui_close = mkOption {
description = "any time the ui menu is closed then the state of the list will be sync'd back to the fs";
type = bool;
default = false;
};
key = mkOption {
description = "how the out list key is looked up. This can be useful when using worktrees and using git remote instead of file path";
type = luaInline;
default = mkLuaInline ''
function()
return vim.loop.cwd()
end
'';
};
};
};
in { in {
options.vim.navigation.harpoon = { options.vim.navigation.harpoon = {
mappings = { mappings = {
@ -38,8 +15,33 @@ in {
file4 = mkMappingOption "Go to marked file 4 [Harpoon]" "<C-;>"; file4 = mkMappingOption "Go to marked file 4 [Harpoon]" "<C-;>";
}; };
enable = mkEnableOption "Harpoon: quick bookmarks on keybinds"; enable = mkEnableOption "Quick bookmarks on keybinds [Harpoon]";
setupOpts = mkPluginSetupOption "Harpoon" setupOptions; setupOpts = mkPluginSetupOption "Harpoon" {
defaults = {
save_on_toggle = mkOption {
type = bool;
default = false;
description = '' any time the ui menu is closed then we will save the
state back to the backing list, not to the fs'';
};
sync_on_ui_close = mkOption {
type = bool;
default = false;
description = '' any time the ui menu is closed then the state of the
list will be sync'd back to the fs'';
};
key = mkOption {
type = luaInline;
default = mkLuaInline ''
function()
return vim.loop.cwd()
end
'';
description = '' how the out list key is looked up. This can be useful
when using worktrees and using git remote instead of file path'';
};
};
};
}; };
} }