PYTHON: Project setup fixed and working, just need to add providers

This commit is contained in:
2026-10-19 20:24:45 -04:00
parent e2864159a8
commit 0f542d56ef
8 changed files with 140 additions and 160 deletions
+29 -29
View File
@@ -7,21 +7,19 @@ M.create_project = function(opts)
default = "",
completion = "filetype",
}, function(ft)
if ft ~= nil and vim.trim(ft) ~= "" then
local ok, actions = pcall(require, "vern.actions." .. ft)
local configs = require("vern.configs." .. ft)
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
if
ok
and actions
and type(actions.create_project) == "function"
then
actions.create_project(args)
else
vim.notify("Unknown Filetype: " .. ft, vim.log.levels.WARN, {
title = "Vern Project",
})
end
ft = ft and vim.trim(ft)
if not ft or vim.trim(ft) == "" then
return
end
local ok, actions = pcall(require, "vern.actions." .. ft)
local configs = require("vern.configs." .. ft)
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
if ok and actions and type(actions.create_project) == "function" then
actions.create_project(args)
else
vim.notify("Unknown Filetype: " .. ft, vim.log.levels.WARN, {
title = "Vern Project",
})
end
end)
end
@@ -33,20 +31,22 @@ M.create_file = function(opts)
default = "",
completion = "filetype",
}, function(ft)
if ft ~= nil and vim.trim(ft) ~= "" then
local ok, actions = pcall(require, "vern.actions." .. ft)
local configs = require("vern.configs." .. ft)
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
if ok and actions and type(actions.create_file) == "function" then
actions.create_file(args)
else
vim.notify("Unknown Filetype: " .. ft, vim.log.levels.WARN, {
title = "Vern File",
})
vim.notify("Error: " .. actions, vim.log.levels.ERROR, {
title = "Vern File",
})
end
ft = ft and vim.trim(ft)
if not ft or vim.trim(ft) == "" then
return
end
local ok, actions = pcall(require, "vern.actions." .. ft)
local configs = require("vern.configs." .. ft)
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
if ok and actions and type(actions.create_file) == "function" then
actions.create_file(args)
else
vim.notify("Unknown Filetype: " .. ft, vim.log.levels.WARN, {
title = "Vern File",
})
vim.notify("Error: " .. actions, vim.log.levels.ERROR, {
title = "Vern File",
})
end
end)
end