Don’t use use the tools from mason. Instead, you should add packages to neovim in home-manager like so:
# home.nix
programs.neovim = {
enable = true;
extraPackages = with pkgs; [
# Formatters
gofumpt
goimports-reviser
golines
# LSP
gopls
# Tools
go
gcc
...
];
};
If you don’t have home-manager installed, you can install it using the following manual:
https://nix-community.github.io/home-manager/
For more inspiration, you can also have a look at this configuration example that someone posted here before: