Compare commits

..

1 commit

Author SHA1 Message Date
dff395a104
fix(rust): remove bacon and rustAnalyzerPackage
Some checks failed
/ check (push) Failing after 39s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Has been skipped
/ build-vm (push) Has been skipped
/ report-size (push) Has been skipped
`rustAnalyzerPackage` was removed and I never got around to properly
using `bacon`, so might as well save on space.
2025-04-12 12:54:28 +02:00

View file

@ -7,7 +7,6 @@
}:
let
inherit (helpers) enableExceptInTests;
inherit (lib.trivial) const;
cfg = config.jhome.nvim;
enabledLSPs = [
"basedpyright"
@ -24,18 +23,21 @@ let
"zls"
"fish_lsp"
];
enableOpt.enable = true;
noPackage.package = null;
in
{
config = lib.mkIf cfg.dev.enable (
lib.mkMerge [
# Enable LSPs
{ plugins.lsp.servers = lib.genAttrs enabledLSPs (const enableOpt); }
{
plugins.lsp.servers = lib.genAttrs enabledLSPs (_: {
enable = true;
});
}
# Remove bundled LSPs
(lib.mkIf (!cfg.dev.bundleLSPs) {
plugins.lsp.servers = lib.genAttrs enabledLSPs (const noPackage);
plugins.lsp.servers = lib.genAttrs enabledLSPs (_: {
package = null;
});
})
# Configure LSPs
{
@ -50,12 +52,11 @@ in
return vim.fs.root(0, {'flake.nix', '.git', '.jj', 'pyproject.toml', 'setup.py'})
end
'';
# Big but infrequently used dependencies.
#
# Configure the LSPs, but don't install the packages.
# If you need to use them, add them to your project's devShell
clangd = noPackage;
zls = noPackage;
bashls.package = lib.mkDefault pkgs.bash-language-server;
# Adds ~2 GiB, install in a devShell instead
clangd.package = lib.mkDefault null;
# zls & other zig tools are big, install in a devShell instead
zls.package = lib.mkDefault null;
};
};
lspkind = {
@ -81,10 +82,10 @@ in
(lib.mkIf (!cfg.dev.bundleGrammars) { plugins.treesitter.grammarPackages = [ ]; })
# Remove tools for building gramars when bundling them
(lib.mkIf cfg.dev.bundleGrammars {
dependencies = {
gcc.enable = false;
nodejs.enable = false;
tree-sitter.enable = false;
plugins.treesitter = {
gccPackage = null;
nodejsPackage = null;
treesitterPackage = null;
};
})
# Configure Formatters
@ -157,11 +158,7 @@ in
};
}
# Rust plugins
{
plugins.rustaceanvim.enable = true;
# install through rustup
dependencies.rust-analyzer.enable = false;
}
{ plugins.rustaceanvim.enable = true; }
# Other plugins
{
plugins = {