aboutsummaryrefslogtreecommitdiff
path: root/nixos/profiles/workstation/doc.nix
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-10-10 12:25:43 +0200
committerMartin Fischer <martin@push-f.com>2026-10-14 07:02:21 +0200
commit14b1b79d01ab39b9c4bb08258162be7d3da506c2 (patch)
tree4feacbb357ae0d7da4ab6ca34d4ddc1b7ebe4d8d /nixos/profiles/workstation/doc.nix
parentd52ba0d225c018df64d32b4840549e3a8cf1ee3b (diff)
tweak(workstation): use neovim instead of vim
Diffstat (limited to 'nixos/profiles/workstation/doc.nix')
-rw-r--r--nixos/profiles/workstation/doc.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/profiles/workstation/doc.nix b/nixos/profiles/workstation/doc.nix
index d57318b..2c8ccc0 100644
--- a/nixos/profiles/workstation/doc.nix
+++ b/nixos/profiles/workstation/doc.nix
@@ -8,7 +8,7 @@
config,
pkgs,
pkgs-unstable,
- ...
+ nvim,
}:
let
@@ -26,10 +26,23 @@ let
cp -f ${pkgs.jujutsu.src}/CHANGELOG.md $out/changelog.md
'';
+ nvimPluginDocs = pkgs.runCommand "nvim-plugin-docs" { } ''
+ mkdir -p $out
+ ${pkgs.lib.concatMapStringsSep "\n" (plugin: ''
+ pluginOut="$out/${pkgs.lib.getName plugin}"
+ find ${plugin} -path '*/doc/*.txt' -type f | while IFS= read -r file; do
+ mkdir -p "$pluginOut"
+ ln -s "$file" "$pluginOut/$(basename "$file")"
+ done
+ '') nvim.plugins}
+ '';
+
symlinks = {
nix = "${config.nix.package.src}/doc/manual/source";
git = "${gitDocs}";
jj = "${jjDocs}";
+ nvim = "${pkgs.neovim-unwrapped}/share/nvim/runtime/doc";
+ nvim-plugins = "${nvimPluginDocs}";
pi = "${pkgs-unstable.pi-coding-agent}/lib/node_modules/pi-monorepo/docs";
};
in