summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
index ffd06cd..a7c26b8 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
@@ -441,10 +441,10 @@ return {
vim.keymap.set("n", "<leader>ji", ":MoltenImagePopup<CR>", { silent = true, desc = "Pop-up image" })
vim.keymap.set("n", "<leader>jw", ":MoltenOpenInBrowser<CR>", { silent = true, desc = "Open in browser" })
vim.keymap.set("n", "<leader>jj", function()
- local venv = os.getenv("WORKON_HOME")
- if venv ~= nil then
- venv = string.match(venv, "/.+/(.+)")
- vim.cmd(("MoltenInit %s"):format(venv))
+ local venv_path = os.getenv("VIRTUAL_ENV")
+ if venv_path then
+ local venv_name = vim.fn.fnamemodify(venv_path, ":t")
+ vim.cmd(("MoltenInit %s"):format(venv_name))
else
vim.cmd("MoltenInit python3")
end