1
0
Fork 0

neovim: Set up python3 virtualenv in postinstall

This commit is contained in:
Jeremy Kaplan 2021-05-21 18:25:26 -07:00
commit 08a6aa3b33
3 changed files with 4 additions and 8 deletions

View file

@ -4,7 +4,7 @@ endif
let &shell = '/bin/sh'
let g:python3_host_prog = expand('~/.virtualenvs/neovim3/bin/python')
let g:python_host_prog = expand('~/.virtualenvs/neovim2/bin/python')
let g:loaded_python_provider = 0 " Disable python2 support for plugins
call plug#begin('~/.local/share/nvim/plugged')
if filereadable(expand("~/.config/nvim/os-plugins.vim"))

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
set -x
CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
[ -d ~/.virtualenvs/neovim3 ] || python3 -m venv ~/.virtualenvs/neovim3
~/.virtualenvs/neovim3/bin/python -c 'import neovim' || ~/.virtualenvs/neovim3/bin/pip install neovim
# https://github.com/junegunn/vim-plug/wiki/tips#install-plugins-on-the-command-line
nvim -es -u ~/.config/nvim/init.vim -i NONE -c "PlugInstall" -c "qa"