fix(rust): remove bacon and rustAnalyzerPackage
`rustAnalyzerPackage` was removed and I never got around to properly using `bacon`, so might as well save on space.
This commit is contained in:
parent
4c94fbec75
commit
aca8824538
2 changed files with 19 additions and 39 deletions
|
@ -17,17 +17,6 @@ in
|
||||||
[
|
[
|
||||||
(lib.mkIf cfg.rust.enable {
|
(lib.mkIf cfg.rust.enable {
|
||||||
home.packages = [ pkgs.rustup ] ++ cfg.rust.extraPackages;
|
home.packages = [ pkgs.rustup ] ++ cfg.rust.extraPackages;
|
||||||
# Background code checker (for Rust)
|
|
||||||
programs.bacon = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
export = {
|
|
||||||
enabled = true;
|
|
||||||
path = ".bacon-locations";
|
|
||||||
line_format = "{kind} {path}:{line}:{column} {message}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (helpers) enableExceptInTests;
|
inherit (helpers) enableExceptInTests;
|
||||||
|
inherit (lib.trivial) const;
|
||||||
cfg = config.jhome.nvim;
|
cfg = config.jhome.nvim;
|
||||||
enabledLSPs = [
|
enabledLSPs = [
|
||||||
"basedpyright"
|
"basedpyright"
|
||||||
|
@ -23,21 +24,18 @@ let
|
||||||
"zls"
|
"zls"
|
||||||
"fish_lsp"
|
"fish_lsp"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
enableOpt.enable = true;
|
||||||
|
noPackage.package = null;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.dev.enable (
|
config = lib.mkIf cfg.dev.enable (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
# Enable LSPs
|
# Enable LSPs
|
||||||
{
|
{ plugins.lsp.servers = lib.genAttrs enabledLSPs (const enableOpt); }
|
||||||
plugins.lsp.servers = lib.genAttrs enabledLSPs (_: {
|
|
||||||
enable = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
# Remove bundled LSPs
|
# Remove bundled LSPs
|
||||||
(lib.mkIf (!cfg.dev.bundleLSPs) {
|
(lib.mkIf (!cfg.dev.bundleLSPs) {
|
||||||
plugins.lsp.servers = lib.genAttrs enabledLSPs (_: {
|
plugins.lsp.servers = lib.genAttrs enabledLSPs (const noPackage);
|
||||||
package = null;
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
# Configure LSPs
|
# Configure LSPs
|
||||||
{
|
{
|
||||||
|
@ -52,11 +50,12 @@ in
|
||||||
return vim.fs.root(0, {'flake.nix', '.git', '.jj', 'pyproject.toml', 'setup.py'})
|
return vim.fs.root(0, {'flake.nix', '.git', '.jj', 'pyproject.toml', 'setup.py'})
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
bashls.package = lib.mkDefault pkgs.bash-language-server;
|
# Big but infrequently used dependencies.
|
||||||
# Adds ~2 GiB, install in a devShell instead
|
#
|
||||||
clangd.package = lib.mkDefault null;
|
# Configure the LSPs, but don't install the packages.
|
||||||
# zls & other zig tools are big, install in a devShell instead
|
# If you need to use them, add them to your project's devShell
|
||||||
zls.package = lib.mkDefault null;
|
clangd = noPackage;
|
||||||
|
zls = noPackage;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
lspkind = {
|
lspkind = {
|
||||||
|
@ -82,10 +81,10 @@ in
|
||||||
(lib.mkIf (!cfg.dev.bundleGrammars) { plugins.treesitter.grammarPackages = [ ]; })
|
(lib.mkIf (!cfg.dev.bundleGrammars) { plugins.treesitter.grammarPackages = [ ]; })
|
||||||
# Remove tools for building gramars when bundling them
|
# Remove tools for building gramars when bundling them
|
||||||
(lib.mkIf cfg.dev.bundleGrammars {
|
(lib.mkIf cfg.dev.bundleGrammars {
|
||||||
plugins.treesitter = {
|
dependencies = {
|
||||||
gccPackage = null;
|
gcc.enable = false;
|
||||||
nodejsPackage = null;
|
nodejs.enable = false;
|
||||||
treesitterPackage = null;
|
tree-sitter.enable = false;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
# Configure Formatters
|
# Configure Formatters
|
||||||
|
@ -159,17 +158,9 @@ in
|
||||||
}
|
}
|
||||||
# Rust plugins
|
# Rust plugins
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins.rustaceanvim.enable = true;
|
||||||
bacon = {
|
# install through rustup
|
||||||
enable = true;
|
dependencies.rust-analyzer.enable = false;
|
||||||
settings.quickfix.enabled = true;
|
|
||||||
};
|
|
||||||
rustaceanvim = {
|
|
||||||
enable = true;
|
|
||||||
# Install through rustup
|
|
||||||
rustAnalyzerPackage = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
# Other plugins
|
# Other plugins
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue