From 83e4e8f6b89c6cdc6fb9633a6a55d1748c36ac35 Mon Sep 17 00:00:00 2001 From: Michel Date: Fri, 1 Sep 2023 20:36:14 +0200 Subject: [PATCH] fix(python): correcty set variables from any location --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 73942a4..72fdab4 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,11 @@ -- See `:h map-table` for map modes -- See `:h stdpath` for paths --- -vim.g.python3_host_prog = vim.fn.stdpath("config") - .. "/" - .. vim.fn.findfile("python3", vim.fn.stdpath("config") .. "/.direnv/**3") + +-- Use Python from neoovim "config" folder +local python_root = vim.fn.glob(vim.fn.stdpath("config") .. "/.direnv/python*", true, true)[1] +vim.env.VIRTUAL_ENV = python_root +vim.env.PATH = python_root .. "/bin" .. ":" .. vim.env.PATH +vim.g.python3_host_prog = vim.fn.findfile("python3", python_root .. "/**3") -- bootstrap lazy.nvim, LazyVim and your plugins require("config.lazy")