Comments (6)
Hmm, can you show me what you have in your plugin config? Will try to see what it can be. :)
And yes, wildcards would be nice in venv names. I think I could support regexp expressions here but need to look into it a bit.
from venv-selector.nvim.
A possible idea could be to "detect" virtual environment folders basing on the folder structure and contents. This could allow to present a very accurate choice list for target environments
from venv-selector.nvim.
I would like to be able to use wildcards in specifying the env list in name={"venv","venv_*"}
if anyway I hardcode my venvname there, I get an error apparently related to missing write privileges on a folder which appears writable.
E5108: Error executing lua Vim:E482: Can't open file %APPDATA%\venv-selector\venvs.json for writing: no such file or directory stack traceback: [C]: in function 'writefile' ...-data/lazy/venv-selector.nvim/lua/venv-selector/venv.lua:303: in function 'cache_venv' ...-data/lazy/venv-selector.nvim/lua/venv-selector/venv.lua:207: in function 'activate_venv' .../lazy/venv-selector.nvim/lua/venv-selector/telescope.lua:76: in function 'key_func' ...nvim-data/lazy/telescope.nvim/lua/telescope/mappings.lua:352: in function 'execute_keymap' [string ":lua"]:1: in main chunk Press ENTER or type command to continue``` Any hints?
I reproduced this issue, while selecting the venv_mfa project of ours (I work with Klaudija aka wonderturtle) on a windows desktop.
plugin config is straightforward from your sample
return {
"linux-cultist/venv-selector.nvim",
dependencies = { "neovim/nvim-lspconfig", "nvim-telescope/telescope.nvim" },
keys = {{
"<leader>vs", "<cmd>:VenvSelect<cr>",
"<leader>vc", "<cmd>:VenvSelectCached<cr>"
}},
config = function()
require("venv-selector").setup({
auto_refresh = false,
search_venv_managers = true,
search_workspace = true,
search = true,
dap_enabled = false,
parents = 2,
name = {"venv","venv_mfa","venv_nvim"}, -- NOTE: You can also use a lua table here for multiple names: {"venv", ".venv"}`
fd_binary_name = "fd",
notify_user_on_activate = true,
})
end;
event = "VeryLazy",
}
from venv-selector.nvim.
i thought this had to do with the fact that we launch neovim from its own python environment, but this is not the case. Error comes also if nvim is lauched without its venv being activated.
from venv-selector.nvim.
The error should be fixed now thanks to #32 but that wasnt related to the virtual environment names.
So lets keep this issue open so someone (maybe me) can add regular expression possibility here for the venv names.
from venv-selector.nvim.
This idea with regular expressions has come up more than once now, and I think it would be a good idea. I will close this issue and open another issue for the regular expression idea.
Lua is not great at regular expressions though but maybe there is a way.
from venv-selector.nvim.
Related Issues (20)
- Can't find any pyenv virtual environments on new version HOT 6
- [Feature Request] Add VenvSelectCached command in regexp version HOT 2
- [Feature Request] Allow searches on discontinuous characters HOT 3
- [Bug] Notification shows up twice on cached venv with copilot alongside lsp HOT 5
- Telescope callback not working as intended HOT 2
- Add ability to activate venv without running lsp server HOT 7
- Improve the usage of VenvSelect on smaller screens HOT 7
- Activate the environment using pyenv. HOT 2
- Error in VenvSelectLog HOT 5
- Add option to use fzf-lua instead of Telescope HOT 20
- how to find the rye venv HOT 3
- Plugin can find venv's but activating them results in file `python` with gibberish content HOT 4
- The plugin does not automatically activate the virtual environment when lazy loaded HOT 10
- Opening a terminal with miniconda env causes a puzzling warning message HOT 9
- Feature Request: Support pixi virtual environments HOT 2
- Spaces in path prevent venv's from being displayed in telescope HOT 2
- Warning on opening nvim every time HOT 1
- Configuring "venv-selector" to use Conda Environment cannot find pyhon.exe HOT 1
- can you please add supports virtual environments created in uv as well? HOT 3
- Pipenv environments are not listed HOT 8
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 venv-selector.nvim.