Chore: moved similar functions to a utils for actions so they dont

repeat and copy costantly. Going to have to think of a better way that
consolidates it all as a lot of it overlaps
This commit is contained in:
2026-10-22 14:36:19 -04:00
parent 685a711644
commit b6d46a0cef
5 changed files with 57 additions and 82 deletions
-21
View File
@@ -12,12 +12,6 @@ return function(bufnr, user_opts)
end
end, { desc = "Run c project" })
-- vim.api.nvim_buf_create_user_command(bufnr, "Pythonpip", function(cmd_args)
-- if actions.pip_install then
-- actions.pip_install()
-- end
-- end, { nargs = "*", desc = "Install python packages" })
for key, def in pairs(opts.python.keybinds or {}) do
if type(def.action) == "function" then
vim.keymap.set("n", key, function()
@@ -29,19 +23,4 @@ return function(bufnr, user_opts)
})
end
end
local root = require("vern.utils").proj_root()
if not root then
return
end
local venv_dir = nil
if vim.uv.fs_stat(root .. "/venv/bin/python") then
venv_dir = root .. "/venv"
elseif vim.uv.fs_stat(root .. "/.venv/bin/python") then
venv_dir = root .. "/.venv"
end
if venv_dir then
vim.env.VIRTUAL_ENV = venv_dir
vim.env.PATH = venv_dir .. "/bin:" .. vim.env.PATH
end
end