Closed tpict closed 6 years ago
I pushed a commit to expose the completor#daemon#kill()
function which is used to kill the current running daemon. You can reload jedi daemon using the following method:
" 1. Change virtualenv.
" 2. Change python executable:
:let g:completor_python_binary = '/path/to/new/python'
" 3. Kill current running daemon:
:call completor#daemon#kill()
Perfect. Thank you so much! I've wanted something like this for a long time.
I think I should be filing this here rather than the Jedi repo, but sorry if I'm incorrect!
It seems like the modules in the path of
g:completor_python_binary
are cached upon entering insert mode in a Python file. It would be really nice if this could be reloaded so that one could switch to a different Python executable dynamically (my use case is switching virtualenvs without restarting Vim).I've had a look through the code but I can't quite figure out when Jedi crawls through the path to find modules. I tried modifying the
_load
function in thecompletor
module to always reloadcompleters.python
but the completion suggestions aren't updated. Please could I get some pointers?