-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.nix
More file actions
44 lines (36 loc) · 1.07 KB
/
config.nix
File metadata and controls
44 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ callPackage
, lib
, pythonWithPackages
, writeTextDir
, kernelName
}:
let
common = callPackage ../../../common.nix {};
pythonEnv = pythonWithPackages (ps: [ps.jedi-language-server]);
jls = pythonEnv.pkgs.jedi-language-server;
languageServerName = "jedi";
passthru = {
inherit languageServerName;
};
in
common.writeTextDirWithMetaAndPassthru jls.meta passthru "lib/codedown/language-servers/python-${kernelName}-jedi.yaml" (lib.generators.toYAML {} [{
name = languageServerName;
version = jls.version;
display_name = "Jedi";
description = jls.meta.description;
icon = ./jedi-logo.png;
extensions = ["py"];
notebook_suffix = ".py";
kernel_name = kernelName;
attrs = ["python"];
type = "stream";
args = ["${pythonEnv}/bin/jedi-language-server"];
# Not sure whether to do this using an environment variable or initialization option
env = {
JEDI_LANGUAGE_SERVER_EXTRA_PATHS = lib.concatStringsSep ":" [
"${pythonEnv}/${pythonEnv.sitePackages}"
"/home/user/.local/${pythonEnv.sitePackages}"
];
};
language_id = "python";
}])