REFACTOR: Completely changed how project creation is done so I can make

other languages easier and hopefully faster
This commit is contained in:
2026-10-22 00:19:19 -04:00
parent df760783ba
commit 3bb97d833b
9 changed files with 347 additions and 105 deletions
+49 -36
View File
@@ -1,40 +1,53 @@
return {
python = {
root = "Python",
source_root = "src/{project_name}",
keybinds = {
["<leader>pr"] = {
desc = "Executes python code",
action = require("vern.actions.python").run,
},
["<leader>pb"] = {
desc = "Asks for what python package to install",
action = require("vern.actions.python").pip_install,
},
local M = {}
M.python = {
root = "Python",
dirs = {
src = "src/{project_name}",
},
keybinds = {
["<leader>pr"] = {
desc = "Executes python code",
action = require("vern.actions.python").run,
},
templates = {
project = {
["bin"] = {
target = "src/{project_name}/main.py",
},
["pkg"] = {
target = "src/{project_name}/__init__.py",
},
["spec"] = {
target = "pyproject.toml",
},
},
file = {
["module"] = {
target = "src/{project_name}/{name}.py",
},
},
extras = {
["gitignore"] = {
template = "vern.templates.extras.gitignore", --- needs to call the function in file
target = ".gitignore",
},
},
["<leader>pb"] = {
desc = "Asks for what python package to install",
action = require("vern.actions.python").pip_install,
},
},
templates = {
project = {
bin = {
path = "{dirs.src}",
-- path = "src/{project_name}",
name = "main.py",
kind = "main",
kind_path = "vern.templates.python",
},
pkg = {
path = "{dirs.src}",
-- path = "src/{project_name}",
name = "__init__.py",
kind = "__init__",
kind_path = "vern.templates.python",
},
cfg = {
path = ".",
name = "pyproject.toml",
kind = "pyproject",
kind_path = "vern.templates.python",
},
},
file = {
mod = {
path = "{dirs.src}",
-- path = "src/{project_name}",
name = "{name}.py",
kind = "module",
kind_path = "vern.templates.python",
},
},
extras = {},
},
}
return M