Files
vern-nvim/lua/vern/configs/c.lua
T
DarthMooMancer 685a711644 REFACTOR: Annotations for autocompletion, reworked how projects are made
and handled, wrote the c file replacing the copied python code.
2026-10-22 04:29:52 -04:00

68 lines
1.7 KiB
Lua

local M = {}
---@type VernLanguageConfig
M.c = {
root = "C",
dirs = {
src = "src",
include = "include/{project_name}",
},
keybinds = {
["<leader>pr"] = {
desc = "Executes c code",
action = require("vern.actions.c").run,
},
["<leader>pf"] = {
desc = "Creates source/header files",
action = require("vern.actions.c").create_file,
},
},
templates = {
project = {
primary = {
path = "{dirs.src}",
name = "main.c",
kind = "main",
kind_path = "vern.templates.c",
},
manifest = {
path = ".",
name = "CMakeLists.txt",
kind = "CmakeLists",
kind_path = "vern.templates.c",
},
style = {
path = ".",
name = ".clang-format",
kind = "format",
kind_path = "vern.templates.c",
},
},
file = {
header = {
path = "{dirs.include}",
name = "{name}.h",
kind = "header",
kind_path = "vern.templates.c",
},
source = {
path = "{dirs.src}",
name = "{name}.c",
kind = "source",
kind_path = "vern.templates.c",
},
},
extras = {
linter = {
path = ".",
name = ".clang-tidy",
kind = "linter",
kind_path = "vern.templates.c",
enabled = false,
},
},
},
}
return M