diff options
Diffstat (limited to 'usecases/desktop/development.nix')
-rw-r--r-- | usecases/desktop/development.nix | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/usecases/desktop/development.nix b/usecases/desktop/development.nix index a347df8..28cb7f2 100644 --- a/usecases/desktop/development.nix +++ b/usecases/desktop/development.nix | |||
@@ -17,12 +17,13 @@ inputs: { | |||
17 | vimPlugins | 17 | vimPlugins |
18 | ; | 18 | ; |
19 | 19 | ||
20 | pylsp = with pkgs.unstable.python3Packages; | 20 | pylsp-env = pkgs.unstable.python3.withPackages (p: |
21 | python-lsp-server.overrideAttrs (old: { | 21 | with p; [ |
22 | propagatedBuildInputs = | 22 | python-lsp-server |
23 | old.propagatedBuildInputs | 23 | python-lsp-server.passthru.optional-dependencies.rope |
24 | ++ python-lsp-server.passthru.optional-dependencies.all; | 24 | python-lsp-ruff |
25 | }); | 25 | pylsp-rope |
26 | ]); | ||
26 | 27 | ||
27 | luaFormat = inputs.self.lib.generators.lua {}; | 28 | luaFormat = inputs.self.lib.generators.lua {}; |
28 | in { | 29 | in { |
@@ -82,15 +83,7 @@ in { | |||
82 | taplo | 83 | taplo |
83 | 84 | ||
84 | # Python | 85 | # Python |
85 | black | ||
86 | python3Packages.isort | ||
87 | python3Packages.mypy | ||
88 | python3Packages.tox | 86 | python3Packages.tox |
89 | # TODO: how to install into pylsp's python env? | ||
90 | # python-lsp-black | ||
91 | # pyls-isort | ||
92 | # pylsp-mypy | ||
93 | |||
94 | ruff | 87 | ruff |
95 | 88 | ||
96 | neovide | 89 | neovide |
@@ -131,20 +124,11 @@ in { | |||
131 | }; | 124 | }; |
132 | }; | 125 | }; |
133 | marksman.cmd = ["${marksman}/bin/marksman"]; | 126 | marksman.cmd = ["${marksman}/bin/marksman"]; |
127 | # TODO: replace with nixd? | ||
134 | nil_ls.cmd = ["${nil}/bin/nil"]; | 128 | nil_ls.cmd = ["${nil}/bin/nil"]; |
135 | pylsp = { | 129 | pylsp = { |
136 | cmd = ["${pylsp}/bin/pylsp"]; | 130 | cmd = ["${pylsp-env}/bin/pylsp"]; |
137 | settings.pylsp.plugins = { | 131 | settings.pylsp.plugins.ruff.enabled = true; |
138 | autopep8.enabled = false; | ||
139 | flake8.ignore = ["E501"]; | ||
140 | pycodestyle.ignore = ["E501"]; | ||
141 | yapf.enabled = false; | ||
142 | |||
143 | # See TODO above | ||
144 | #black.enabled = true; | ||
145 | #isort.enabled = true; | ||
146 | #mypy.enabled = true; | ||
147 | }; | ||
148 | }; | 132 | }; |
149 | }; | 133 | }; |
150 | 134 | ||
@@ -218,9 +202,9 @@ in { | |||
218 | RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; | 202 | RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; |
219 | CARGO_HOME = "${config.xdg.dataHome}/cargo"; | 203 | CARGO_HOME = "${config.xdg.dataHome}/cargo"; |
220 | 204 | ||
221 | RUFF_CACHE_DIR= "${config.xdg.cacheHome}/ruff"; | 205 | RUFF_CACHE_DIR = "${config.xdg.cacheHome}/ruff"; |
222 | 206 | ||
223 | PYTHONPYCACHEPREFIX= "${config.xdg.cacheHome}/python"; | 207 | PYTHONPYCACHEPREFIX = "${config.xdg.cacheHome}/python"; |
224 | PYTHONUSERBASE = "${config.xdg.dataHome}/python"; | 208 | PYTHONUSERBASE = "${config.xdg.dataHome}/python"; |
225 | 209 | ||
226 | _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java"; | 210 | _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java"; |