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
+26
View File
@@ -0,0 +1,26 @@
local actions = require("vern.actions.cpp")
local config = require("vern.configs.cpp")
---@param bufnr integer Buffer to activate on : defaults to 0
---@param user_opts? VernCPPConfig
return function(bufnr, user_opts)
---@type VernCPPConfig
local opts = vim.tbl_deep_extend("force", {}, config, user_opts or {})
vim.api.nvim_buf_create_user_command(bufnr, "CPPRun", function()
if type(actions.run) == "function" then
actions.run(opts)
end
end, { desc = "Run cpp project" })
for key, def in pairs(opts.cpp.keybinds or {}) do
if type(def.action) == "function" then
vim.keymap.set("n", key, function()
def.action(opts)
end, {
buffer = bufnr,
silent = true,
desc = def.desc,
})
end
end
end