nvim-lsp: add gopls support

This commit is contained in:
imMaturana 2022-01-29 03:25:55 -04:00 committed by Pedro Alves
parent e246034491
commit ce16aebd2f
2 changed files with 19 additions and 0 deletions

View file

@ -11,6 +11,7 @@ in
./rnix-lsp.nix
./pyright.nix
./zls.nix
./gopls.nix
];
options = {

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ...}:
with lib;
let
cfg = config.programs.nixvim.plugins.lsp.servers.gopls;
in
{
options = {
programs.nixvim.plugins.lsp.servers.gopls = {
enable = mkEnableOption "Enable gopls, for Go.";
};
};
config = mkIf cfg.enable {
programs.nixvim.extraPackages = [ pkgs.gopls ];
programs.nixvim.plugins.lsp.enabledServers = [ "gopls"];
};
}