From fae2d85cca05a08103a1652752ea0f4c29a81be7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 16 Jun 2024 22:30:11 +0200 Subject: [PATCH] nvim: Fix crash on no python venv available --- nvim/.config/nvim/lua/core/util.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/core/util.lua b/nvim/.config/nvim/lua/core/util.lua index 63b9c9d..93278d4 100644 --- a/nvim/.config/nvim/lua/core/util.lua +++ b/nvim/.config/nvim/lua/core/util.lua @@ -33,7 +33,8 @@ local function path_join(...) return table.concat(vim.tbl_flatten({ ... }), "/") end function T.set_python_env(workspace) - local base = vim.fn.expand(require("core.util").get_python_venv_basefolder(workspace)) + local base = require("core.util").get_python_venv_basefolder(workspace) + base = vim.fn.expand(base) local p = vim.env.PATH or "" if not base then return