summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dotfiles/vim/lua/vim-dev.lua4
-rw-r--r--usecases/desktop/development.nix40
2 files changed, 12 insertions, 32 deletions
diff --git a/dotfiles/vim/lua/vim-dev.lua b/dotfiles/vim/lua/vim-dev.lua
index 2b91d8c..98db662 100644
--- a/dotfiles/vim/lua/vim-dev.lua
+++ b/dotfiles/vim/lua/vim-dev.lua
@@ -44,7 +44,6 @@ null_ls.setup({
44 null_ls.builtins.code_actions.statix, 44 null_ls.builtins.code_actions.statix,
45 45
46 null_ls.builtins.diagnostics.deadnix, 46 null_ls.builtins.diagnostics.deadnix,
47 null_ls.builtins.diagnostics.ruff,
48 null_ls.builtins.diagnostics.shellcheck, 47 null_ls.builtins.diagnostics.shellcheck,
49 null_ls.builtins.diagnostics.statix, 48 null_ls.builtins.diagnostics.statix,
50 null_ls.builtins.diagnostics.vale.with { 49 null_ls.builtins.diagnostics.vale.with {
@@ -52,8 +51,6 @@ null_ls.setup({
52 }, 51 },
53 52
54 null_ls.builtins.formatting.alejandra, 53 null_ls.builtins.formatting.alejandra,
55 null_ls.builtins.formatting.black,
56 null_ls.builtins.formatting.ruff,
57 null_ls.builtins.formatting.shfmt, 54 null_ls.builtins.formatting.shfmt,
58 null_ls.builtins.formatting.taplo, 55 null_ls.builtins.formatting.taplo,
59 }, 56 },
@@ -66,4 +63,3 @@ vim.g["pandoc#formatting#extra_equalprg"] = "--reference-links --reference-locat
66 63
67-- Actions preview 64-- Actions preview
68require("actions-preview").setup() 65require("actions-preview").setup()
69
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 {};
28in { 29in {
@@ -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";