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
+9 -4
View File
@@ -1,14 +1,19 @@
local M = {}
function M.imp(ft, template, name)
---@param ft string Filetype of template
---@param template string Template in language table
---@param name string A string to replace temp values in template
---@return string
function M.fetch(ft, template, name)
ft, template, name = ft or "", template or "", name or ""
if ft == "" or template == "" or name == "" then
return
return ""
end
local ok, mod = pcall(require, "vern.templates." .. ft)
if ok and type(mod) ~= "table" then
return string.gsub(mod[template], "%%s", name)
if ok and type(mod) == "table" then
return (string.gsub(mod[template], "%%s", name))
end
return ""
end
return M