nvim-lsp: add zls support

This commit is contained in:
Gabriel Maturana 2022-01-17 15:02:08 -04:00 committed by GitHub
parent ba4afda369
commit 9d1911a5d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -10,6 +10,7 @@ in
./rust-analyzer.nix
./rnix-lsp.nix
./pyright.nix
./zls.nix
];
options = {

18
plugins/nvim-lsp/zls.nix Normal file
View file

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