From ac6956f1feb09201289f08268668200aefaefada Mon Sep 17 00:00:00 2001 From: Anund Date: Thu, 19 Dec 2024 13:04:36 +1100 Subject: [PATCH] nix: support `programs.vim.plugins = [ ghostty.vim ]` nix 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 nvim will find the plugin via nested directories making ghostty.vim and ghostty the same for `programs.neovim.plugins` --- nix/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index 889eb978f..27dd29003 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -157,7 +157,7 @@ in chmod u+rwX -R $ZIG_GLOBAL_CACHE_DIR ''; - outputs = ["out" "terminfo" "shell_integration"]; + outputs = ["out" "terminfo" "shell_integration" "vim"]; postInstall = '' terminfo_src=${ @@ -177,6 +177,8 @@ in mv "$out/share/ghostty/shell-integration" "$shell_integration/shell-integration" ln -sf "$shell_integration/shell-integration" "$out/share/ghostty/shell-integration" echo "$shell_integration" >> "$out/nix-support/propagated-user-env-packages" + + cp -r $out/share/vim/vimfiles "$vim" ''; postFixup = ''