This commit is contained in:
Snoweuph 2026-02-27 20:20:07 +00:00 committed by GitHub
commit dd3e5a7208
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 2 deletions

View file

@ -208,6 +208,9 @@
- Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics.
- Added [`gopher.nvim`](https://github.com/olexsmir/gopher.nvim) for extra
actions in `languages.go`.
- updated default filetypes for
[harper-ls](https://github.com/Automattic/harper) to match what they are
supposed to be.

View file

@ -9,8 +9,8 @@
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.generators) mkLuaInline;
inherit (lib.types) bool enum package;
inherit (lib.nvim.types) mkGrammarOption diagnostics deprecatedSingleOrListOf;
inherit (lib.types) bool enum package str;
inherit (lib.nvim.types) mkGrammarOption diagnostics deprecatedSingleOrListOf mkPluginSetupOption;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.attrsets) mapListToAttrs;
@ -231,6 +231,40 @@ in {
inherit defaultDiagnosticsProvider;
};
};
extensions = {
gopher-nvim = {
enable = mkEnableOption "Minimalistic plugin for Go development";
setupOpts = mkPluginSetupOption "gopher-nvim" {
commands = {
go = mkOption {
description = "go binary to use";
type = str;
default = "go";
};
gomodifytags = mkOption {
description = "gomodifytags binary to use";
type = str;
default = getExe pkgs.gomodifytags;
};
gotests = mkOption {
description = "gotests binary to use";
type = str;
default = getExe pkgs.gotests;
};
impl = mkOption {
description = "impl binary to use";
type = str;
default = getExe pkgs.impl;
};
iferr = mkOption {
description = "iferr binary to use";
type = str;
default = getExe pkgs.iferr;
};
};
};
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -292,5 +326,14 @@ in {
cfg.extraDiagnostics.types);
};
})
(mkIf cfg.extensions.gopher-nvim.enable {
vim.lazy.plugins.gopher-nvim = {
package = "gopher-nvim";
setupModule = "gopher";
inherit (cfg.extensions.gopher-nvim) setupOpts;
ft = ["go"];
};
})
]);
}

View file

@ -669,6 +669,19 @@
"url": "https://github.com/MagicDuck/grug-far.nvim/archive/275dbedc96e61a6b8d1dfb28ba51586ddd233dcf.tar.gz",
"hash": "sha256-qn1BTNCX0Sm158Lv5JfHThqlJX9ualCIlc+RCjWa+t8="
},
"gopher-nvim": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "olexsmir",
"repo": "gopher.nvim"
},
"branch": "main",
"submodules": false,
"revision": "6a3924cee5a9f36d316f8e4a90c3020438d3513f",
"url": "https://github.com/olexsmir/gopher.nvim/archive/6a3924cee5a9f36d316f8e4a90c3020438d3513f.tar.gz",
"hash": "sha256-iXTmgdADtZFQVm+IN+JoPActGuO8r7VTeHKJdkEgmVo="
},
"gruvbox": {
"type": "Git",
"repository": {