serhii.net

In the middle of the desert you can say anything you want

19 Dec 2021

nvim

Is nice! It transparently got all vim’s configs plugins and they seems to work!

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

A Complete Guide to Neovim Configuration for Python Development - jdhao’s blog

jedi-vim and deoplete

deoplete for faster completions, jedi-vim for goto and friends.

davidhalter/jedi-vim: Using the jedi autocompletion library for VIM.

Interesting bindings:

let g:jedi#usages_command = "<leader>n"
let g:jedi#goto_command = "<leader>d"
let g:jedi#rename_command = "<leader>r"
let g:jedi#documentation_command = "K"

But it didn’t work for packages not living inside the default python environment, and manually each venv would be tedious. poet-v to the rescue!

let g:poetv_executables = ['poetry']
map <leader>va :PoetvActivate<CR>

Deoplete1 is an autocomplete framework (nvim-only, was my last reason for switching), deoplete-jedi2 makes it use jedi.

To select on enter, had to add this to vimrc/nvimrc:

set completeopt+=noinsert

In general deoplete faq in vim help is much longer than the one on their github repo.

nvie/vim-flake8: Flake8 plugin for Vim, <F7> to run it on the current buffer.

Nel mezzo del deserto posso dire tutto quello che voglio.