CHORE: Fixed bug #4 by looping dirs and creating directories before

other loops in creation.
LANG: Added CPP and bugfixed c to use c code and not python
This commit is contained in:
2026-10-23 08:25:21 -04:00
parent b6d46a0cef
commit 1c4a61ce7f
10 changed files with 382 additions and 33 deletions
+67
View File
@@ -0,0 +1,67 @@
local M = {}
---@type VernLanguageConfig
M.cpp = {
root = "CPP",
dirs = {
src = "src",
include = "include/{project_name}",
},
keybinds = {
["<leader>pr"] = {
desc = "Executes cpp code",
action = require("vern.actions.cpp").run,
},
["<leader>pf"] = {
desc = "Creates source/header files",
action = require("vern.actions.cpp").create_file,
},
},
templates = {
project = {
primary = {
path = "{dirs.src}",
name = "main.cpp",
kind = "main",
kind_path = "vern.templates.cpp",
},
manifest = {
path = ".",
name = "CMakeLists.txt",
kind = "CmakeLists",
kind_path = "vern.templates.cpp",
},
style = {
path = ".",
name = ".clang-format",
kind = "format",
kind_path = "vern.templates.cpp",
},
},
file = {
header = {
path = "{dirs.include}",
name = "{name}.hpp",
kind = "header",
kind_path = "vern.templates.cpp",
},
source = {
path = "{dirs.src}",
name = "{name}.c",
kind = "source",
kind_path = "vern.templates.cpp",
},
},
extras = {
linter = {
path = ".",
name = ".clang-tidy",
kind = "linter",
kind_path = "vern.templates.c",
enabled = false,
},
},
},
}
return M