initial commit

This commit is contained in:
Barrett Ruth 2025-09-11 23:52:32 -05:00
commit dcb7debff6
29 changed files with 1276 additions and 0 deletions

24
lua/cp/snippets.lua Normal file
View file

@ -0,0 +1,24 @@
local M = {}
function M.setup(config)
local has_luasnip, luasnip = pcall(require, 'luasnip')
if not has_luasnip then
return
end
local snippets = {}
for name, snippet in pairs(config.snippets or {}) do
if type(snippet) == 'table' and snippet.trig then
table.insert(snippets, snippet)
else
table.insert(snippets, snippet)
end
end
if #snippets > 0 then
luasnip.add_snippets('cpp', snippets)
end
end
return M