nix: support programs.vim.plugins = [ ghostty.vim ] (#3010)

nixos vim module expects vim plugins to have their code organized as top
level directories. eg: `/ftdetect` rather than
`/share/vim/vimfiles/ftdetect`. Adding a separate output seems like a
convenient way to reference the plugin files in `programs.vim.plugins
...`. Interestingly neovim will find the plugin via directory traversal
making `ghostty.vim` and `ghostty` the same for
`programs.neovim.plugins`

I agree to re-license my commits to MIT
This commit is contained in:
Mitchell Hashimoto
2024-12-19 07:22:23 -08:00
committed by GitHub

View File

@ -157,7 +157,7 @@ in
chmod u+rwX -R $ZIG_GLOBAL_CACHE_DIR chmod u+rwX -R $ZIG_GLOBAL_CACHE_DIR
''; '';
outputs = ["out" "terminfo" "shell_integration"]; outputs = ["out" "terminfo" "shell_integration" "vim"];
postInstall = '' postInstall = ''
terminfo_src=${ terminfo_src=${
@ -177,6 +177,8 @@ in
mv "$out/share/ghostty/shell-integration" "$shell_integration/shell-integration" mv "$out/share/ghostty/shell-integration" "$shell_integration/shell-integration"
ln -sf "$shell_integration/shell-integration" "$out/share/ghostty/shell-integration" ln -sf "$shell_integration/shell-integration" "$out/share/ghostty/shell-integration"
echo "$shell_integration" >> "$out/nix-support/propagated-user-env-packages" echo "$shell_integration" >> "$out/nix-support/propagated-user-env-packages"
cp -r $out/share/vim/vimfiles "$vim"
''; '';
postFixup = '' postFixup = ''