From 1cdb5bdf412933bb1be44a3ae5905202124718d9 Mon Sep 17 00:00:00 2001 From: Rabin Adhikari Date: Wed, 5 Jun 2024 20:18:49 +0545 Subject: [PATCH] feat(python): switch to regexp branch for a rewrite the venv selector plugin (#3301) It has eliminated many bugs and allows users to easily add their searches, if the plugin doesn't find them automatically. --- lua/lazyvim/plugins/extras/lang/python.lua | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 7a716b3e..54d25d8c 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -112,20 +112,17 @@ return { }, { "linux-cultist/venv-selector.nvim", + branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", - opts = function(_, opts) - if LazyVim.has("nvim-dap-python") then - opts.dap_enabled = true - end - return vim.tbl_deep_extend("force", opts, { - name = { - "venv", - ".venv", - "env", - ".env", + opts = { + settings = { + options = { + notify_user_on_venv_activation = true, }, - }) - end, + }, + }, + -- Call config for python files and load the cached venv automatically + ft = "python", keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, }, {