large refactor

This commit is contained in:
Daniel Winkler 2026-05-23 21:59:54 +10:00
commit db610620b3
10 changed files with 286 additions and 143 deletions

158
README.md
View file

@ -33,11 +33,9 @@ Modular Neovim wrapper config. Defines a wrapped `vv` binary with per-category p
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ nvimConfig.overlays.dependencies ]; overlays = [ nvimConfig.overlays.dependencies ];
}; };
evalResult = nvimConfig.inputs.wrappers.lib.evalModules { evalResult = nvimConfig.lib.eval {
modules = [ inherit pkgs;
nvimConfig.wrapperModules.default modules = [ projectSettings ]; # see below
projectSettings # see below
];
}; };
in { in {
default = evalResult.config.wrap { inherit pkgs; }; default = evalResult.config.wrap { inherit pkgs; };
@ -49,19 +47,14 @@ Modular Neovim wrapper config. Defines a wrapped `vv` binary with per-category p
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ nvimConfig.overlays.dependencies ]; overlays = [ nvimConfig.overlays.dependencies ];
}; };
evalResult = nvimConfig.inputs.wrappers.lib.evalModules { evalResult = nvimConfig.lib.eval {
modules = [ inherit pkgs;
nvimConfig.wrapperModules.default modules = [ projectSettings ];
projectSettings
];
}; };
nv = evalResult.config.wrap { inherit pkgs; }; nv = evalResult.config.wrap { inherit pkgs; };
in { in {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = packages = [ nv ] ++ nvimConfig.lib.devShellPackages evalResult.config;
[ nv ]
++ (evalResult.config.catPkgs.markdown or [])
++ (evalResult.config.catPkgs.nix or []);
}; };
}); });
}; };
@ -92,7 +85,96 @@ Modular Neovim wrapper config. Defines a wrapped `vv` binary with per-category p
## Overriding settings ## Overriding settings
Define a `projectSettings` attrset and pass it as the second module in `evalModules`. Every option in `nvimConfig.wrapperConfigs.default` can be overridden here. Define a `projectSettings` attrset and pass it to `nvimConfig.lib.eval` or `nvimConfig.lib.mkWrapper`. The helper injects your overlaid `pkgs` automatically, so downstream consumers do not need to wire `specialArgs` themselves. Every option in `nvimConfig.wrapperConfigs.default` can be overridden here. Local `packages.default`, local `devShells.default`, downstream helper usage, and `pkgs.vv` all resolve the same module defaults unless you override them.
### Basic downstream flake example
This example enables a few cats, adds runtime tools to the shared wrapper/devShell package set, and appends language libraries to the default Python and R environments.
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rixpkgs.url = "github:dwinkler1/rixpkgs/af2dd3f7b4b172077747c0869d4e30702fb71b0e";
fran = {
url = "github:dwinkler1/fran";
inputs.nixpkgs.follows = "rixpkgs";
};
nvimConfig = {
url = "github:dwinkler1/nvimConfig";
inputs = {
nixpkgs.follows = "nixpkgs";
rixpkgs.follows = "rixpkgs";
fran.follows = "fran";
};
};
};
outputs = { nixpkgs, nvimConfig, ... }: let
system = "aarch64-darwin";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ nvimConfig.overlays.dependencies ];
};
projectSettings = {
cats = {
python = true;
r = true;
nix = true;
markdown = true;
optional = true;
};
settings.lang_packages = {
python = with pkgs.python3Packages; [
pandas
pyarrow
];
r = with pkgs.rpkgs.rPackages; [
fixest
modelsummary
];
};
catPkgs = {
python = [
(pkgs.python3.withPackages (ps:
ps
++ (with ps; [
pandas
pyarrow
])))
pkgs.ruff
pkgs.basedpyright
pkgs.uv
pkgs.nodejs
];
nix = [
pkgs.alejandra
pkgs.nil
];
optional = [
pkgs.git
pkgs.fd
pkgs.ripgrep
];
};
};
evalResult = nvimConfig.lib.eval {
inherit pkgs;
modules = [ projectSettings ];
};
nv = evalResult.config.wrap { inherit pkgs; };
in {
packages.${system}.default = nv;
devShells.${system}.default = pkgs.mkShell {
packages = [ nv ] ++ nvimConfig.lib.devShellPackages evalResult.config;
};
};
}
```
### Categories ### Categories
@ -112,9 +194,13 @@ projectSettings = {
}; };
``` ```
### Language packages (overlay extension) ### Language packages (module defaults)
Add Python/R/Julia libraries that get appended to the overlay base packages. Add Python/R/Julia libraries that get appended to the module defaults. The built-in defaults are:
- Python: `duckdb`, `polars`
- R: `arrow`, `broom`, `data_table`, `janitor`, `styler`, `nvimcom`
- Julia: `DataFramesMeta`, `QuackIO`
```nix ```nix
projectSettings = { projectSettings = {
@ -138,7 +224,7 @@ projectSettings = {
### Runtime dependencies (per-cat packages) ### Runtime dependencies (per-cat packages)
Override `catPkgs` to add tools that appear in both the wrapper PATH and the devShell. To add always-available packages not gated by any cat, use `runtimePkgs` directly (see next section). Override `catPkgs` to change the full runtime tool lists that appear in both the wrapper PATH and the devShell. Use normal assignments to merge list values, or `lib.mkForce` to replace them.
```nix ```nix
projectSettings = { projectSettings = {
@ -179,6 +265,14 @@ projectSettings = {
`env` values are forced; `envDefault` values can be overridden by the user's shell. `env` values are forced; `envDefault` values can be overridden by the user's shell.
### Choosing the right override surface
- Use `cats` to enable or disable a whole language or tooling category.
- Use `settings.lang_packages` to add or replace Python, R, or Julia libraries within a language environment.
- Use `catPkgs` to change the full runtime tool list for a category. `config.runtimePkgs` drives wrapper PATH composition, while `nvimConfig.lib.devShellPackages config` returns the package-only list suitable for `mkShell`.
- Use `env` or `envDefault` for wrapper environment variables.
- Use `specs` for plugin additions or custom runtime behavior.
### Neovim settings ### Neovim settings
```nix ```nix
@ -226,22 +320,20 @@ projectSettings = {
## Architecture ## Architecture
``` ```
langPackages (flake.nix) ──► settings.lang_packages (module option) settings/lang-packages.nix ──► settings.lang_packages
cats.nix ──► config.cats │ cats.nix ───────────────► config.cats │
│ │ │ │
▼ ▼ ▼ ▼
cat-packages.nix ──► config.catPkgs.<cat> cat-packages.nix ───────► config.catPkgs.<cat>
│ │ │ │
┌───────┘ │ ├──────────────┐ │
▼ ▼ ▼ ▼ ▼
deps.nix (runtimePkgs) flake.nix (devShells) deps.nix PATH wrapper.config.wrap devShells.default
│ │
▼ ▼
wrapped vv PATH nix develop PATH
``` ```
- **Overlays** (`overlays/`) inject base packages into nixpkgs (rWrapper, quarto, baseRPackages, basePythonPackages). - **Overlays** (`overlays/`) inject dependency package sets into nixpkgs (`rpkgs`, `baseRPackages`, `basePythonPackages`, plugins). Top-level `rWrapper` and `quarto` are compatibility conveniences, but `pkgs.rpkgs` is the canonical R surface for downstream configuration.
- **cat-packages.nix** is the single source of truth for per-category packages. Each list is gated by its cat toggle. - **cat-packages.nix** is the single source of truth for per-category packages. Each list is gated by its cat toggle.
- **deps.nix** wires `catPkgs` into the wrapper's runtime PATH. - **deps.nix** wires `catPkgs` into the wrapper's runtime PATH.
- **flake.nix** reads `catPkgs` for the devShell. `langPackages` feeds into `settings.lang_packages`. - **settings.lang_packages** holds the shared defaults used by local outputs and downstream module consumers.
- **flake.nix** exports `lib.eval`, `lib.mkWrapper`, and `lib.devShellPackages` as the canonical downstream helpers, and builds `packages.default` and `devShells.default` from the same module config.

167
flake.nix
View file

@ -42,40 +42,42 @@
wrappers, wrappers,
... ...
} @ inputs: let } @ inputs: let
langPackages = pkgs: { devShellCatOrder = [
python = with pkgs.python3Packages; [ "always"
duckdb "clickhouse"
polars "external"
]; "julia"
r = "lua"
(with pkgs.rpkgs.rPackages; [ "markdown"
arrow "nix"
broom "optional"
data_table "python"
janitor "r"
styler "treesitterParsers"
]) ];
++ [pkgs.nvimcom]; evalWithPkgs = pkgs: extraModules:
julia = [ wrappers.lib.evalModules {
"DataFramesMeta" specialArgs = {
"QuackIO" inherit pkgs;
]; };
}; modules =
[
mkWrapperConfig = pkgs: { module
settings = { ]
lang_packages = langPackages pkgs; ++ extraModules;
};
binName = "vv";
};
wrapperSettings = pkgs: let
cfg = mkWrapperConfig pkgs;
in
wrapper.config.wrap {
inherit pkgs;
inherit (cfg) settings binName;
}; };
mkDevShellPackages = config:
builtins.concatLists (map (name: config.catPkgs.${name} or []) devShellCatOrder);
mkShellHook = config:
''
echo 'I am a NixShell'
''
+ nixpkgs.lib.optionalString (config.cats.r or false) ''
export R_HOME=$(R RHOME)
export R_LIBS_SITE=$(strings "$(command -v R)" | grep -oP '/nix/store/[^:]+/library' | sort -u | paste -sd: -)
export R_LIBS_USER="$PWD/.r-libs"
mkdir -p "$R_LIBS_USER"
'';
systems = [ systems = [
"aarch64-darwin" "aarch64-darwin"
@ -93,35 +95,40 @@
config = {allowUnfree = true;}; config = {allowUnfree = true;};
overlays = [ overlays = [
overlayDefs.dependencyOverlay overlayDefs.dependencyOverlay
inputs.r-nvim-nix.overlays.default
inputs.fran.overlays.default
]; ];
}; };
module = (import ./modules/neovim.nix) inputs; module = (import ./modules/neovim.nix) inputs;
wrapper = wrappers.lib.evalModule module;
in { in {
lib = {
eval = {pkgs, modules ? []}: evalWithPkgs pkgs modules;
mkWrapper = {pkgs, modules ? []}: (evalWithPkgs pkgs modules).config.wrap {inherit pkgs;};
devShellPackages = config: mkDevShellPackages config;
};
overlays = { overlays = {
# overlay `vv` wraps the module with default settings only. # overlay `vv` wraps the module with default settings only.
# For the fully-configured binary (including mkWrapperConfig overrides), # It is evaluated against the final package set so module defaults can
# use `packages.<system>.default` instead. # depend on overlays such as rixpkgs-backed `pkgs.rpkgs`.
default = nixpkgs.lib.composeManyExtensions [ default = nixpkgs.lib.composeManyExtensions [
overlayDefs.dependencyOverlay overlayDefs.dependencyOverlay
(final: prev: { (final: prev: {
vv = wrapper.config.wrap {pkgs = final;}; vv = (evalWithPkgs final []).config.wrap {pkgs = final;};
}) })
]; ];
dependencies = overlayDefs.dependencyOverlay; dependencies = overlayDefs.dependencyOverlay;
}; };
wrapperModules.default = module; wrapperModules.default = module;
wrapperConfigs.default = wrapper.config; wrapperConfigs.default = {pkgs, modules ? []}: (self.lib.eval {inherit pkgs modules;}).config;
packages = forAllSystems ( packages = forAllSystems (
system: let system: let
pkgs = mkPkgs system; pkgs = mkPkgs system;
in { in {
default = wrapperSettings pkgs; default = self.lib.mkWrapper {
inherit pkgs;
};
} }
); );
@ -135,30 +142,13 @@
devShells = forAllSystems ( devShells = forAllSystems (
system: let system: let
pkgs = mkPkgs system; pkgs = mkPkgs system;
nvimPkg = wrapperSettings pkgs; config = (self.lib.eval {inherit pkgs;}).config;
nvimPkg = config.wrap {inherit pkgs;};
shellPackages = [nvimPkg]
++ wrapper.config.catPkgs.always or []
++ wrapper.config.catPkgs.python or []
++ wrapper.config.catPkgs.r or []
++ wrapper.config.catPkgs.julia or []
++ wrapper.config.catPkgs.markdown or []
++ wrapper.config.catPkgs.optional or []
++ wrapper.config.catPkgs.external or []
++ wrapper.config.catPkgs.nix or []
++ wrapper.config.catPkgs.lua or []
++ wrapper.config.catPkgs.clickhouse or [];
in { in {
default = pkgs.mkShell { default = pkgs.mkShell {
name = "vShell"; name = "vShell";
packages = shellPackages; packages = [nvimPkg] ++ self.lib.devShellPackages config;
shellHook = '' shellHook = mkShellHook config;
echo 'I am a NixShell'
export R_HOME=$(R RHOME)
export R_LIBS_SITE=$(strings "$(command -v R)" | grep -oP '/nix/store/[^:]+/library' | sort -u | paste -sd: -)
export R_LIBS_USER="$PWD/.r-libs"
mkdir -p "$R_LIBS_USER"
'';
}; };
} }
); );
@ -166,10 +156,31 @@
checks = forAllSystems ( checks = forAllSystems (
system: let system: let
pkgs = mkPkgs system; pkgs = mkPkgs system;
nvimPkg = wrapperSettings pkgs; defaultConfig = (self.lib.eval {inherit pkgs;}).config;
defaultNvimPkg = defaultConfig.wrap {inherit pkgs;};
defaultShellHook = mkShellHook defaultConfig;
overrideConfig =
(self.lib.eval {
inherit pkgs;
modules = [
{
cats = {
r = false;
python = true;
};
settings.lang_packages.python = nixpkgs.lib.mkForce (with pkgs.python3Packages; [
pandas
]);
catPkgs.nix = nixpkgs.lib.mkForce [
pkgs.alejandra
];
}
];
}).config;
overrideShellHook = mkShellHook overrideConfig;
in { in {
default = pkgs.runCommand "check-vv" {} '' default = pkgs.runCommand "check-vv" {} ''
BINARY_PATH="${nvimPkg}/bin/vv" BINARY_PATH="${defaultNvimPkg}/bin/vv"
if [ ! -x "$BINARY_PATH" ]; then if [ ! -x "$BINARY_PATH" ]; then
echo "Error: Binary not found or not executable" echo "Error: Binary not found or not executable"
@ -186,11 +197,37 @@
fi fi
''; '';
module-eval = let module-eval = let
_ = wrapper.config; _ = (self.lib.eval {inherit pkgs;}).config;
in in
pkgs.runCommand "check-module-eval" {} '' pkgs.runCommand "check-module-eval" {} ''
echo "Module evaluation successful" > $out echo "Module evaluation successful" > $out
''; '';
downstream-overrides = let
overrideNix = builtins.map (p: p.pname or p.name) overrideConfig.catPkgs.nix;
defaultAssertions = [
(defaultConfig.cats.r or false)
(builtins.match ".*R RHOME.*" defaultShellHook != null)
(builtins.length (self.lib.devShellPackages defaultConfig) > 0)
];
overrideAssertions = [
(!(overrideConfig.cats.r or false))
(builtins.length overrideNix == 1)
((builtins.head overrideNix) == "alejandra")
(builtins.match ".*R RHOME.*" overrideShellHook == null)
];
in
pkgs.runCommand "check-downstream-overrides" {
pass =
if builtins.all (x: x) (defaultAssertions ++ overrideAssertions)
then "1"
else "";
} ''
if [ -z "$pass" ]; then
echo "Downstream override assertions failed" >&2
exit 1
fi
echo "Downstream override assertions passed" > $out
'';
} }
); );

View file

@ -70,7 +70,6 @@ in
tokei tokei
wget wget
yq yq
zathura
]); ]);
python = maybe "python" (let python = maybe "python" (let
@ -90,15 +89,14 @@ in
r = maybe "r" (let r = maybe "r" (let
r_packages = (pkgs.baseRPackages or [ ]) ++ config.settings.lang_packages.r; r_packages = (pkgs.baseRPackages or [ ]) ++ config.settings.lang_packages.r;
in in [
with pkgs; [ (pkgs.rpkgs.rWrapper.override { packages = r_packages; })
(rWrapper.override { packages = r_packages; }) pkgs.rpkgs.radianWrapper
radianWrapper (pkgs.rpkgs.quarto.override { extraRPackages = r_packages; })
(quarto.override { extraRPackages = r_packages; }) pkgs.air-formatter
air-formatter pkgs.yaml-language-server
yaml-language-server pkgs.rnvimserver
rnvimserver ]);
]);
# cats without packages get empty lists # cats without packages get empty lists
general = [ ]; general = [ ];

View file

@ -16,7 +16,7 @@
# Lua packages available to neovim (for :lua require()) # Lua packages available to neovim (for :lua require())
config.settings.nvim_lua_env = lp: config.settings.nvim_lua_env = lp:
lib.optionals (config.cats.general or true) [ lp.tiktoken_core ]; lib.optionals (config.cats.general or false) [ lp.tiktoken_core ];
# Binary name for the wrapper # Binary name for the wrapper
config.binName = lib.mkDefault "vv"; config.binName = lib.mkDefault "vv";

View file

@ -7,21 +7,21 @@
# Environment variables set for the wrapper. # Environment variables set for the wrapper.
# These are available when running neovim. # These are available when running neovim.
config.env = lib.mkMerge [ config.env = lib.mkMerge [
(lib.mkIf (config.cats.python or true) { (lib.mkIf (config.cats.python or false) {
UV_PYTHON_DOWNLOADS = "never"; UV_PYTHON_DOWNLOADS = "never";
UV_PYTHON = pkgs.python.interpreter; UV_PYTHON = pkgs.python.interpreter;
}) })
(lib.mkIf (config.cats.r or true) { (lib.mkIf (config.cats.r or false) {
RNVIM_COMPLDIR = "$PWD/.r-compl"; RNVIM_COMPLDIR = "$PWD/.r-compl";
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs"; R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.r-libs";
TMPDIR = "$PWD/.r-tmp"; TMPDIR = "$PWD/.r-tmp";
}) })
]; ];
# Environment variables with defaults (can be overridden by user) # Environment variables with defaults (can be overridden by user)
config.envDefault = lib.mkMerge [ config.envDefault = lib.mkMerge [
(lib.mkIf (config.cats.r or true) { (lib.mkIf (config.cats.r or false) {
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs"; R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.r-libs";
}) })
]; ];
} }

View file

@ -29,7 +29,7 @@
]; ];
}; };
} }
(lib.mkIf (config.cats.julia or true) { (lib.mkIf (config.cats.julia or false) {
jl = { jl = {
nvim-host.enable = true; nvim-host.enable = true;
nvim-host.package = "${pkgs.julia-bin}/bin/julia"; nvim-host.package = "${pkgs.julia-bin}/bin/julia";
@ -39,10 +39,10 @@
]; ];
}; };
}) })
(lib.mkIf (config.cats.python or true) { (lib.mkIf (config.cats.python or false) {
python3.nvim-host.enable = true; python3.nvim-host.enable = true;
}) })
(lib.mkIf (config.cats.r or true) { (lib.mkIf (config.cats.r or false) {
r = { r = {
nvim-host.enable = true; nvim-host.enable = true;
nvim-host.package = "${pkgs.rWrapper}/bin/R"; nvim-host.package = "${pkgs.rWrapper}/bin/R";

View file

@ -1,5 +1,6 @@
{ {
config, config,
pkgs,
lib, lib,
... ...
}: }:
@ -26,14 +27,29 @@
}; };
default = { }; default = { };
description = '' description = ''
Language-specific package overrides appended to each language spec's runtimePackages. Language-specific package defaults and downstream overrides appended to each
Intended for flake.nix overrides via wrapper.config.wrap. language spec's runtime packages.
''; '';
}; };
config.settings.lang_packages = { config.settings.lang_packages = {
python = lib.mkDefault [ ]; python = lib.mkDefault (with pkgs.python3Packages; [
r = lib.mkDefault [ ]; duckdb
julia = lib.mkDefault [ ]; polars
]);
r = lib.mkDefault (
(with pkgs.rpkgs.rPackages; [
arrow
broom
data_table
janitor
styler
])
++ [pkgs.nvimcom]
);
julia = lib.mkDefault [
"DataFramesMeta"
"QuackIO"
];
}; };
} }

View file

@ -13,13 +13,13 @@
}; };
}; };
config.specs.always = lib.mkIf (config.cats.always or true) { config.specs.always = lib.mkIf (config.cats.always or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.always; runtimePkgs = config.catPkgs.always;
}; };
config.specs.external = lib.mkIf (config.cats.external or true) { config.specs.external = lib.mkIf (config.cats.external or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
before = ["INIT_MAIN"]; before = ["INIT_MAIN"];
config = '' config = ''
@ -29,50 +29,50 @@
runtimePkgs = config.catPkgs.external; runtimePkgs = config.catPkgs.external;
}; };
config.specs.optional = lib.mkIf (config.cats.optional or true) { config.specs.optional = lib.mkIf (config.cats.optional or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
before = ["INIT_MAIN"]; before = ["INIT_MAIN"];
runtimePkgs = config.catPkgs.optional; runtimePkgs = config.catPkgs.optional;
}; };
config.specs.markdown = lib.mkIf (config.cats.markdown or true) { config.specs.markdown = lib.mkIf (config.cats.markdown or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.markdown; runtimePkgs = config.catPkgs.markdown;
}; };
config.specs.nix = lib.mkIf (config.cats.nix or true) { config.specs.nix = lib.mkIf (config.cats.nix or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.nix; runtimePkgs = config.catPkgs.nix;
}; };
config.specs.lua = lib.mkIf (config.cats.lua or true) { config.specs.lua = lib.mkIf (config.cats.lua or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.lua; runtimePkgs = config.catPkgs.lua;
}; };
config.specs.python = lib.mkIf (config.cats.python or true) { config.specs.python = lib.mkIf (config.cats.python or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.python; runtimePkgs = config.catPkgs.python;
}; };
config.specs.r = lib.mkIf (config.cats.r or true) { config.specs.r = lib.mkIf (config.cats.r or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.r; runtimePkgs = config.catPkgs.r;
}; };
config.specs.julia = lib.mkIf (config.cats.julia or true) { config.specs.julia = lib.mkIf (config.cats.julia or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.julia; runtimePkgs = config.catPkgs.julia;
}; };
config.specs.clickhouse = lib.mkIf (config.cats.clickhouse or true) { config.specs.clickhouse = lib.mkIf (config.cats.clickhouse or false) {
data = lib.mkDefault null; data = lib.mkDefault null;
runtimeDeps = "prefix"; runtimeDeps = "prefix";
runtimePkgs = config.catPkgs.clickhouse; runtimePkgs = config.catPkgs.clickhouse;

View file

@ -4,11 +4,11 @@
lib, lib,
... ...
}: { }: {
config.specs.gitPlugins = lib.mkIf (config.cats.gitPlugins or true) { config.specs.gitPlugins = lib.mkIf (config.cats.gitPlugins or false) {
data = []; data = [];
}; };
config.specs.r = lib.mkIf (config.cats.r or true) { config.specs.r = lib.mkIf (config.cats.r or false) {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
pkgs.r-nvim pkgs.r-nvim
quarto-nvim quarto-nvim
@ -19,14 +19,14 @@
]; ];
}; };
config.specs.markdown-lazy = lib.mkIf (config.cats.markdown or true) { config.specs.markdown-lazy = lib.mkIf (config.cats.markdown or false) {
lazy = true; lazy = true;
data = [ data = [
config.nvim-lib.neovimPlugins.cmp-pandoc-references config.nvim-lib.neovimPlugins.cmp-pandoc-references
]; ];
}; };
config.specs.general = lib.mkIf (config.cats.general or true) { config.specs.general = lib.mkIf (config.cats.general or false) {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
lze lze
lzextras lzextras
@ -79,7 +79,7 @@
]; ];
}; };
config.specs.lua = lib.mkIf (config.cats.lua or true) { config.specs.lua = lib.mkIf (config.cats.lua or false) {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
luvit-meta luvit-meta
{ {
@ -89,7 +89,7 @@
]; ];
}; };
config.specs.markdown = lib.mkIf (config.cats.markdown or true) { config.specs.markdown = lib.mkIf (config.cats.markdown or false) {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
quarto-nvim quarto-nvim
render-markdown-nvim render-markdown-nvim
@ -104,7 +104,7 @@
]; ];
}; };
config.specs.utils = lib.mkIf (config.cats.utils or true) { config.specs.utils = lib.mkIf (config.cats.utils or false) {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
blink-cmp blink-cmp
nvim-lspconfig nvim-lspconfig
@ -119,7 +119,7 @@
]; ];
}; };
config.specs.treesitterParsers = lib.mkIf (config.cats.treesitterParsers or true) { config.specs.treesitterParsers = lib.mkIf (config.cats.treesitterParsers or false) {
data = with pkgs.vimPlugins.nvim-treesitter-parsers; [ data = with pkgs.vimPlugins.nvim-treesitter-parsers; [
bash bash
c c
@ -158,7 +158,7 @@
]; ];
}; };
config.specs.utils-lazy = lib.mkIf (config.cats.utils or true) { config.specs.utils-lazy = lib.mkIf (config.cats.utils or false) {
lazy = true; lazy = true;
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
blink-compat blink-compat
@ -175,7 +175,7 @@
]; ];
}; };
config.specs.gitPlugins-lazy = lib.mkIf (config.cats.gitPlugins or true) { config.specs.gitPlugins-lazy = lib.mkIf (config.cats.gitPlugins or false) {
lazy = true; lazy = true;
data = []; data = [];
}; };

View file

@ -61,7 +61,7 @@ now(function()
min_editor_width = 80, min_editor_width = 80,
rconsole_height = 20, rconsole_height = 20,
nvimpager = "split_h", nvimpager = "split_h",
pdfviewer = "zathura", pdfviewer = "",
}) })
end end
end) end)