diff --git a/README.md b/README.md index 0291bffc..ccd2481f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Personal configuration and plugins for Vim curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage chmod u+x nvim.appimage mv nvim.appimage "$HOME/bin/." +ln -s "$HOME/bin/nvim.appimage" "$HOME/bin/nvim" # Optional to avoid extension in commands # ./nvim.appimage ``` @@ -22,7 +23,11 @@ Plugin definitions are in `init.vim`, inside `vim` run `:PlugInstall` to install ## Enabling python support ```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 diff --git a/init.vim b/init.vim index 91cf65d8..f1857236 100644 --- a/init.vim +++ b/init.vim @@ -35,7 +35,7 @@ Plug 'christoomey/vim-tmux-navigator' call plug#end() 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 -- Mappings. @@ -77,10 +77,20 @@ local lsp_flags = { debounce_text_changes = 150, } require('lspconfig')['pylsp'].setup{ + cmd = {"/home/elitherl/.pyenv/versions/neovim3/bin/pylsp"}, on_attach = on_attach, flags = lsp_flags, + settings = { + pylsp = { + plugins = { + pycodestyle = {maxLineLength = 88}, + flake8 = {maxLineLength = 88} + } + } + } } require('lspconfig')['fortls'].setup{ + cmd = {"/home/elitherl/.pyenv/versions/neovim3/bin/fortls"}, on_attach = on_attach, flags = lsp_flags, } diff --git a/pynvim_install.sh b/pynvim_install.sh new file mode 100755 index 00000000..038c96ce --- /dev/null +++ b/pynvim_install.sh @@ -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