prototype to call jedi completion server in subprocess #624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Call jedi in a subprocess, executed with python on PATH.
This is a very messy prototype of calling Jedi in a subprocess, with less code running in the actual vim-embedded Python. PR for discussion only. I hope it is enough to demonstrate that doing a process split is not a big deal. Sorry that the vendored attrs library adds noise to the diff.
I wanted this to be able to use embedded-Python-3-only vim with Python 2 and importantly PyPy projects. I should probably just recompile vim myself, but I tried this.
The way it works is that jedi_client.py mocks the impressively small jedi API needed by jedi-vim. When you make a call it sends a line of JSON to the server, just a subprocess, which calls real jedi and writes a single line of JSON as the response. Just completions and signatures implemented so far.
If this was developed further then jedi-vim could stay the same, except that a configuration flag imports from jedi_client instead of jedi.