You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear cultist, I tried to register as observer to changes in the choice of the python venv -- tried the hook but this is not started. Either I missinterprete the hook or i have a bug, that I do not understand. Could you please tell me the mistake in using the plugin hooks ?
--- @param venv_path string A string containing the absolute path to selected virtualenv
--- @param venv_python string A string containing the absolute path to python binary in selected venv
local function changed_python(venv_path, venv_python)
-local file = io.open("/tmp/venv_change.log", "a") -- /tmp ist ein Beispielpfad
-- file:write("changed_python wurde aufgerufen mit " .. venv_path .. "\n")
-- file:close()
-- vim.notify("Virtuelle Umgebung geändert auf: " .. venv_path, vim.log.levels.INFO)
-- end
Dear cultist, I tried to register as observer to changes in the choice of the python venv -- tried the hook but this is not started. Either I missinterprete the hook or i have a bug, that I do not understand. Could you please tell me the mistake in using the plugin hooks ?
--- @param venv_path string A string containing the absolute path to selected virtualenv
--- @param venv_python string A string containing the absolute path to python binary in selected venv
local function changed_python(venv_path, venv_python)
-local file = io.open("/tmp/venv_change.log", "a") -- /tmp ist ein Beispielpfad
-- file:write("changed_python wurde aufgerufen mit " .. venv_path .. "\n")
-- file:close()
-- vim.notify("Virtuelle Umgebung geändert auf: " .. venv_path, vim.log.levels.INFO)
-- end
return {
"linux-cultist/venv-selector.nvim",
-- dependencies = {
-- "neovim/nvim-lspconfig",
-- },
branch = "regexp",
config = function()
require("venv-selector").setup({
-- auto_refresh = true,
changed_venv_hooks = { changed_python },
settings = {
find_code_venvs = {
command = "fd '^python[0-9.]$' ~/.pyenv/versions --type x --exclude '/pkgs/*'",
},
},
lsp_auto_setup = false,
})
end,
keys = Phonon.venvKeys,
-- keys = {
-- { "nv", "VenvSelect" },
-- },
}
The text was updated successfully, but these errors were encountered: