Compare commits
1 commit
aca8824538
...
dff395a104
Author | SHA1 | Date | |
---|---|---|---|
dff395a104 |
1 changed files with 18 additions and 21 deletions
|
@ -7,7 +7,6 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (helpers) enableExceptInTests;
|
inherit (helpers) enableExceptInTests;
|
||||||
inherit (lib.trivial) const;
|
|
||||||
cfg = config.jhome.nvim;
|
cfg = config.jhome.nvim;
|
||||||
enabledLSPs = [
|
enabledLSPs = [
|
||||||
"basedpyright"
|
"basedpyright"
|
||||||
|
@ -24,18 +23,21 @@ 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 (const noPackage);
|
plugins.lsp.servers = lib.genAttrs enabledLSPs (_: {
|
||||||
|
package = null;
|
||||||
|
});
|
||||||
})
|
})
|
||||||
# Configure LSPs
|
# Configure LSPs
|
||||||
{
|
{
|
||||||
|
@ -50,12 +52,11 @@ 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
|
||||||
'';
|
'';
|
||||||
# Big but infrequently used dependencies.
|
bashls.package = lib.mkDefault pkgs.bash-language-server;
|
||||||
#
|
# Adds ~2 GiB, install in a devShell instead
|
||||||
# Configure the LSPs, but don't install the packages.
|
clangd.package = lib.mkDefault null;
|
||||||
# If you need to use them, add them to your project's devShell
|
# zls & other zig tools are big, install in a devShell instead
|
||||||
clangd = noPackage;
|
zls.package = lib.mkDefault null;
|
||||||
zls = noPackage;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
lspkind = {
|
lspkind = {
|
||||||
|
@ -81,10 +82,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 {
|
||||||
dependencies = {
|
plugins.treesitter = {
|
||||||
gcc.enable = false;
|
gccPackage = null;
|
||||||
nodejs.enable = false;
|
nodejsPackage = null;
|
||||||
tree-sitter.enable = false;
|
treesitterPackage = null;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
# Configure Formatters
|
# Configure Formatters
|
||||||
|
@ -157,11 +158,7 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# Rust plugins
|
# Rust plugins
|
||||||
{
|
{ plugins.rustaceanvim.enable = true; }
|
||||||
plugins.rustaceanvim.enable = true;
|
|
||||||
# install through rustup
|
|
||||||
dependencies.rust-analyzer.enable = false;
|
|
||||||
}
|
|
||||||
# Other plugins
|
# Other plugins
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue