-
Notifications
You must be signed in to change notification settings - Fork 0
Python dependencies as submodules #412
base: master
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,6 @@ | |||
if !has('nvim') | |||
execute 'silent! py3file' fnameescape(expand('<sfile>:p').'.py') | |||
execute 'py3file' fnameescape(expand('<sfile>:p').'.py') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better not to hide the output here. Makes debugging a bit easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Remove commented line then.
Any feedback on this? |
I don't think it's necessary. You have to pip install neovim module anyway, so I don't see how adding two more names to the list can be problematic. |
You don't need to pip-install anything for Vim though. I think this change improves user experience a lot for this case. |
Fair enough. I was only thinking of Neovim. |
I'll give it a spin today. Could you please raise a PR to update the installation instructions in the meantime? Please also include the recent change py2 -> py3 Thanks! |
@@ -1,5 +1,6 @@ | |||
if !has('nvim') | |||
execute 'silent! py3file' fnameescape(expand('<sfile>:p').'.py') | |||
execute 'py3file' fnameescape(expand('<sfile>:p').'.py') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Remove commented line then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work smoothly with a range of Vim plugin managers? Which ones have been tried?
Could you also please check make lint
? We used to have CI on this project but it was a private Drone installation and I'm not sure what's happened with it…
sys.path.insert(0, six_path) | ||
websocket_path = os.path.join(os.path.dirname(__file__), 'websocket-client') | ||
sys.path.insert(0, websocket_path) | ||
import websocket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice to hide away all the sys.path
hackery in one place at early initialization, so you can keep normal-looking imports in the commonly-edited files and probably avoid linter complaints, etc. The __init__.py
in ensime_shared
might work, or it might have to go to autoload/ensime.vim.py
and rplugin/python3/ensime.py
where there is already path hackery. There is some duplication in that case, maybe there's a way to eliminate it but I didn't find a good one yet.
Also, why do we need six at this time? |
This adds all Python dependencies as git submodules. They will all be cloned upon plugin installation, and the user will no longer need to take any manual steps, i.e.
pip install
.