[feat] nvim: add custom vim plugin management
Use vimPluginsUpdater to keep extra plugins up to date Fixes #4
This commit is contained in:
parent
52407688d0
commit
a4277829ad
6 changed files with 65 additions and 22 deletions
19
justfile
19
justfile
|
@ -11,6 +11,25 @@ build-vm:
|
|||
run-vm: build-vm
|
||||
QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm
|
||||
|
||||
update-vim-plugins:
|
||||
#!/bin/sh
|
||||
# Use local nixpkgs if available
|
||||
nixpkgs="$HOME/Dev/nixpkgs"
|
||||
# copy nixpkgs from local checkout
|
||||
if [ ! -d "$nixpkgs" ]; then
|
||||
nixpkgs="$(mktemp -d)"
|
||||
cp -r /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/. "$nixpkgs"
|
||||
cd "$nixpkgs"
|
||||
git init .
|
||||
git add .
|
||||
git commit -m 'dummy commit'
|
||||
cd -
|
||||
fi
|
||||
# update vim plugins
|
||||
nix run nixpkgs#vimPluginsUpdater -- --nixpkgs "$nixpkgs" --no-commit -i ./nvim/extraPlugins/plugins -o ./nvim/extraPlugins/generated.nix update
|
||||
# format the generated output
|
||||
nix fmt ./nvim/extraPlugins/generated.nix
|
||||
|
||||
# Amend Update flake.lock PR
|
||||
flake-pr:
|
||||
git branch -D update_flake_lock_action || echo "no previous update branch"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue