diff --git a/users/modules/neovim/default.nix b/users/modules/neovim/default.nix index 6d2b848..72b35d1 100644 --- a/users/modules/neovim/default.nix +++ b/users/modules/neovim/default.nix @@ -7,6 +7,7 @@ in imports = [ ./nvim-lsp.nix ./js.nix + ./go.nix ./rust.nix ./nix.nix ]; @@ -30,6 +31,9 @@ in vim-sleuth ]; + extraPackages = with pkgs; [ + nodePackages.prettier + ]; extraConfig = '' set background=dark set termguicolors diff --git a/users/modules/neovim/go.nix b/users/modules/neovim/go.nix new file mode 100644 index 0000000..a67ff66 --- /dev/null +++ b/users/modules/neovim/go.nix @@ -0,0 +1,19 @@ +{ lib, pkgs, config, ... }: +let + cfg = config.mae.nvim.go; +in +with lib; +{ + options.mae.nvim.go.enable = lib.mkEnableOption "Enable go language support in neovim"; + + config = mkIf cfg.enable { + mae.nvim.lsp.servers.gopls = { + enable = true; + script = '' + { + cmd = { "${pkgs.gopls}/bin/gopls" }, + } + ''; + }; + }; +} diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index 7bfde99..a7bdbef 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -7,6 +7,7 @@ js.deno.enable = true; nix.enable = true; rust.enable = true; + go.enable = true; #clangd.enable = true; #python.enable = true; };