1
0
Fork 0

nvim: support branch names for plugins

This commit is contained in:
Daniel Kempkens 2024-05-02 16:34:50 +02:00
parent d3249da6da
commit 5289a424d0
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 6 additions and 0 deletions

View file

@ -60,5 +60,6 @@
- src: lewis6991/gitsigns.nvim
- src: sindrets/diffview.nvim
- src: NeogitOrg/neogit
branch: nightly
- src: j-hui/fidget.nvim
- src: folke/which-key.nvim

View file

@ -49,6 +49,11 @@ for plugin in "${plugin_array[@]}"; do
nix_prefetch_flags+=" --fetch-submodules"
fi
branch="$(echo "$plugin" | jq -r '.branch // empty')"
if [ -n "$branch" ]; then
nix_prefetch_flags+=" --rev refs/heads/$branch"
fi
rev="$(echo "$plugin" | jq -r '.rev // empty')"
if [ -n "$rev" ]; then
nix_prefetch_flags+=" --rev $rev"