plugins/lsp: add nixd language server

This commit is contained in:
Gaetan Lepage 2023-06-13 09:39:54 +02:00 committed by Gaétan Lepage
parent da04916de2
commit 885a746073
4 changed files with 95 additions and 5 deletions

View file

@ -309,6 +309,53 @@ with lib; let
};
settings = cfg: {nil = {inherit (cfg) formatting diagnostics;};};
}
{
name = "nixd";
description = "Enable nixd, for Nix";
package = pkgs.nixd;
settings = cfg: {nixd = cfg;};
settingsOptions = {
# The evaluation section, provide auto completion for dynamic bindings.
eval = {
target = {
args = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
Accept args as "nix eval".
'';
installable = helpers.defaultNullOpts.mkStr "" ''
"nix eval"
'';
};
depth = helpers.defaultNullOpts.mkInt 0 "Extra depth for evaluation";
workers = helpers.defaultNullOpts.mkInt 3 "The number of workers for evaluation task.";
};
formatting = {
command = helpers.defaultNullOpts.mkStr "nixpkgs-fmt" ''
Which command you would like to do formatting
'';
};
options = {
enable = helpers.defaultNullOpts.mkBool true ''
Enable option completion task.
If you are writting a package, disable this
'';
target = {
args = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
Accept args as "nix eval".
'';
installable = helpers.defaultNullOpts.mkStr "" ''
"nix eval"
'';
};
};
};
}
{
name = "pylsp";
description = "Enable pylsp, for Python.";