From 9dd750694bfbfe6b999d45e1c80802cd504e75a4 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Mon, 19 Apr 2021 20:03:49 -0700 Subject: [PATCH] nvim: Install plugins as a post-install hook --- default.conf.yaml | 3 +++ neovim/pluginstall.vim | 2 ++ neovim/postinstall | 7 +++++++ 3 files changed, 12 insertions(+) create mode 100644 neovim/pluginstall.vim create mode 100755 neovim/postinstall diff --git a/default.conf.yaml b/default.conf.yaml index 5107911..f085394 100644 --- a/default.conf.yaml +++ b/default.conf.yaml @@ -32,3 +32,6 @@ ~/.zprofile: zsh/.zprofile ~/.zshenv: zsh/.zshenv ~/.zshrc: zsh/.zshrc + +- shell: + - ./neovim/postinstall diff --git a/neovim/pluginstall.vim b/neovim/pluginstall.vim new file mode 100644 index 0000000..4ef5e3b --- /dev/null +++ b/neovim/pluginstall.vim @@ -0,0 +1,2 @@ +:PlugInstall +:xa diff --git a/neovim/postinstall b/neovim/postinstall new file mode 100755 index 0000000..96863eb --- /dev/null +++ b/neovim/postinstall @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +nvim --headless -s "${CURDIR}/pluginstall.vim"