nvim-lsp: add pyright lsp

This commit is contained in:
Builditluc 2021-11-23 15:41:03 +01:00 committed by Pedro Alves
parent 1e98f2f597
commit 42870eb04b
2 changed files with 19 additions and 0 deletions

View file

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

View file

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