68 lines
1.7 KiB
Lua
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
|