Comments (3)
Hey @cnrrobertson!
Glad you like my plugin! By looking at the snippet you provide, you are looking at every python binary found in $HOME, right? This would give me a list of at least 20 different python venvs to choose from. py_lsp
tries to find venvs based on a strategy like poetry
or venv
. So we should add a new conda
strategy to it.
So what we would need is a command like conda venvs list
, that lists all available venvs that are created through conda
. Do you know if there exists such a option with conda? Otherwise I could take a look at it?
Here you can find all existing strategies :)
Greetings Patrick
from py_lsp.nvim.
Yeah, so the local commands = {'fd --glob -tl python $HOME/mambaforge', 'which -a python', is_home_dir() and '' or 'find . -name python'}
is the main search command.
It finds python binaries in my conda directory ($HOME/mambaforge
), in whatever is currently activated (which -a python
could find a venv, conda environment, or just the system binary), and then if we are NOT in $HOME
it looks recursively in the current directory to find any environments. Not particularly efficient, I like your implementation better I think.
Conda does have a command conda env list
to see all available venvs. The key difference is that all the environments are stored in a $HOME
directory rather than in the project directory. It actually makes them easy to find. Common home directory names are ~/anaconda
, ~/condaforge
, ~/miniconda3
, ~/mambaforge
. But they could be named anything, so it might require an additional configuration option to get the directory..
I could write up a strategy for finding conda environments with a new source strategy conda
that looks for common names in the home directory and submit a PRif that's helpful? I could also add a new configuration option to explicitly give the conda directory name if you're up for that.
from py_lsp.nvim.
Ah, haven't noticed the mambaforge
directory.
Feel free to write a PR, if you are having any questions just write me!
Thanks in advance! 🚀
from py_lsp.nvim.
Related Issues (20)
- Update optional dependency lsp installer HOT 4
- Add notify manager to docu
- [Help]: more LSP support HOT 2
- Add support for other Python LSP server HOT 1
- Add Telescope integration HOT 2
- Selector and options for predefined venvs
- Add versioning and package specs
- Issue with :PyFindVenvs HOT 2
- Telescope is a necessary dependency? HOT 3
- [Request] Read pyproject.toml venv property HOT 3
- Add :checkhealth py_lsp
- Telescope picker error HOT 1
- Automatic source from PyLspFindVenvs results HOT 1
- Update docu
- Spawning language server with cmd: `pylsp` failed. HOT 2
- Make FindLspFindVenvs showing a short env name at head? HOT 2
- Refactoring: Venv collection
- Shouldn't PyLspActivateVenv be automatic? HOT 9
- Make :PyRun async with output printed to stdout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py_lsp.nvim.