{ pkgs, ... }:
{
home.packages = with pkgs; [
go
gofumpt
gopls
gotools
golines
delve
gomodifytags
golangci-lint
golangci-lint-langserver
];
home.sessionPath = [
"$HOME/go/bin"
];
home.shellAliases = {
gom = "go mod";
gomt = "go mod tidy";
gomd = "go mod download";
gog = "go get";
gogu = "go get -u";
};
home.sessionVariables.GOTOOLCHAIN = "local"; # use installed go tools
programs.emacs.extraPackages =
epkgs:
(with epkgs; [
go-eldoc
go-tag
templ-ts-mode
(treesit-grammars.with-grammars (
grammars: with grammars; [
tree-sitter-go
tree-sitter-gowork
tree-sitter-gomod
tree-sitter-templ
]
))
]);
programs.nixvim.plugins.lsp.servers = {
gopls.enable = true;
golangci_lint_ls.enable = true;
};
programs.zed-editor.extensions = [
"live-template"
"golangci-lint"
"gosum"
];
}
user/settings/development/golang.nix (view raw)