-
Notifications
You must be signed in to change notification settings - Fork 216
[Question] Virtual environments? #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wondered about this too, maybe I'm missing something but using Sublime Text I specify the To be fair this is generally not a problem for most plugins since they don't change that much between versions anyway, but in other editors like PyCharm or VSCode you'll be prompted to install the missing library in your virtual environment. Am I correct in that interpretation? Is this a problem in the design of pylsp or something that could be solved at the plugin level? |
I used "coc.nvim" to create It is only for verification, so it is not published on npm. Why not just detect the If you want to use pylsp and more tools, any version at the project level, I guess the approach would be to install pylsp in a virtual environment. |
I can run nvim from venv shell and the language server will work file, but only if language server and |
I have |
I have an error if pynvim is not installed in venv:
May be it's only in my configuration. |
This is an excerpt in my environment. No problem.
The pynvim thing has nothing to do with pylsp, so you can ask about it on Neovim's "gitter" or "issue". |
I worked some days with using separate lsp server to each venv, works fine. So, I'll close the issue. Thanks for help. |
Hi @TitaniumHocker so you are installing |
Neovim 0.5 is out now, so this is no longer just for pre-release. Installing Thankfully I'm not using a stricter python package manager that would object to the extra package. I am still looking for a solution to this that makes it work more like my previous setup in neovim. |
We provide the option Note: This is something that needs to be solved client-side, so please stop posting comments here and open an issue in Neovim or your other editors or IDEs to add support for that. |
Apologies for the noise. Thanks for the pointer. |
My global #!/bin/sh
pipenv scripts > /dev/null 2>&1 || {
echo "run pylsp inside directory with Pipfile"
exit 1
}
exec pipenv run pylsp "$@" Please mind the hack. 🚂 |
Hello!
First of all thank you guys for supporting this fork.
I'm using neovim as my main code editor and right now I'm trying to migrate from coc.nvim to native neovim LSP client implementation(which is still in development btw).
So, I don't figured out how to configure this language server to use executables from virtual environment instead of global scope of my system. For example from python
venv
orpipenv
. In coc It was enough just to specify configuration parameter "python.pythonPath" with the full path to the python executable file in the virtual environment and everything works fine.Tech information above
System: Manjaro GNU/Linux
LSP Client: neovim v0.5.0-dev
The text was updated successfully, but these errors were encountered: