mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
nvim-lsp: add gopls support
This commit is contained in:
parent
e246034491
commit
ce16aebd2f
2 changed files with 19 additions and 0 deletions
|
@ -11,6 +11,7 @@ in
|
|||
./rnix-lsp.nix
|
||||
./pyright.nix
|
||||
./zls.nix
|
||||
./gopls.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
18
plugins/nvim-lsp/gopls.nix
Normal file
18
plugins/nvim-lsp/gopls.nix
Normal 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"];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue