Config changes to use specific neovim3 env for LSP
This commit is contained in:
parent
55dde49d12
commit
b683dc9045
|
@ -6,6 +6,7 @@ Personal configuration and plugins for Vim
|
||||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
|
||||||
chmod u+x nvim.appimage
|
chmod u+x nvim.appimage
|
||||||
mv nvim.appimage "$HOME/bin/."
|
mv nvim.appimage "$HOME/bin/."
|
||||||
|
ln -s "$HOME/bin/nvim.appimage" "$HOME/bin/nvim" # Optional to avoid extension in commands
|
||||||
# ./nvim.appimage
|
# ./nvim.appimage
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -22,7 +23,11 @@ Plugin definitions are in `init.vim`, inside `vim` run `:PlugInstall` to install
|
||||||
|
|
||||||
## Enabling python support
|
## Enabling python support
|
||||||
```bash
|
```bash
|
||||||
pip install -U pynvim python-lsp-server fortls
|
pyenv virtualenv neovim3 # Assumes working pyenv
|
||||||
|
pyenv activate neovim3
|
||||||
|
pip install -U pip setuptools wheel
|
||||||
|
pip install -U pynvim "python-lsp-server[all]" fortls pylsp-mypy python-lsp-black
|
||||||
|
pyenv deactivate
|
||||||
```
|
```
|
||||||
|
|
||||||
## Miscellaneous settings
|
## Miscellaneous settings
|
||||||
|
|
12
init.vim
12
init.vim
|
@ -35,7 +35,7 @@ Plug 'christoomey/vim-tmux-navigator'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
set mouse=nv
|
set mouse=nv
|
||||||
let g:python3_host_prog = '~/.pyenv/versions/base/bin/python'
|
let g:python3_host_prog = '~/.pyenv/versions/neovim3/bin/python'
|
||||||
|
|
||||||
lua << EOF
|
lua << EOF
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
|
@ -77,10 +77,20 @@ local lsp_flags = {
|
||||||
debounce_text_changes = 150,
|
debounce_text_changes = 150,
|
||||||
}
|
}
|
||||||
require('lspconfig')['pylsp'].setup{
|
require('lspconfig')['pylsp'].setup{
|
||||||
|
cmd = {"/home/elitherl/.pyenv/versions/neovim3/bin/pylsp"},
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
|
settings = {
|
||||||
|
pylsp = {
|
||||||
|
plugins = {
|
||||||
|
pycodestyle = {maxLineLength = 88},
|
||||||
|
flake8 = {maxLineLength = 88}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
require('lspconfig')['fortls'].setup{
|
require('lspconfig')['fortls'].setup{
|
||||||
|
cmd = {"/home/elitherl/.pyenv/versions/neovim3/bin/fortls"},
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
}
|
}
|
||||||
|
|
6
pynvim_install.sh
Executable file
6
pynvim_install.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#! /usr/bin/env sh
|
||||||
|
pyenv virtualenv neovim3 # Assumes working pyenv
|
||||||
|
pyenv activate neovim3
|
||||||
|
pip install -U pip setuptools wheel
|
||||||
|
pip install -U pynvim "python-lsp-server[all]" fortls pylsp-mypy python-lsp-black
|
||||||
|
pyenv deactivate
|
Loading…
Reference in a new issue