From 08a6aa3b33a7a692cfff5133cec47f4cc4dc6b89 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Fri, 21 May 2021 18:25:26 -0700 Subject: [PATCH] neovim: Set up python3 virtualenv in postinstall --- neovim/init.vim | 2 +- neovim/postinstall | 4 +++- notes | 6 ------ 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 notes diff --git a/neovim/init.vim b/neovim/init.vim index 3636db7..af5511d 100644 --- a/neovim/init.vim +++ b/neovim/init.vim @@ -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")) diff --git a/neovim/postinstall b/neovim/postinstall index 1c53504..ace1e99 100755 --- a/neovim/postinstall +++ b/neovim/postinstall @@ -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" diff --git a/notes b/notes deleted file mode 100644 index 421d843..0000000 --- a/notes +++ /dev/null @@ -1,6 +0,0 @@ -Configs that support having a local untracked import: -* polybar -* qutebrowser - -Post-install things: -* Create neovim2 and neovim3 virtualenvs