Make cpp for snippet dynamic

This commit is contained in:
2024-06-01 10:30:52 +01:00
parent 0410dfc23d
commit 59d3ea0978
5 changed files with 58 additions and 15 deletions

View File

@@ -6,7 +6,7 @@ local snip = luasnip.snippet
local text = luasnip.text_node
-- local isn = luasnip.indent_snippet_node
-- local t = luasnip.text_node
local insert = luasnip.insert_node
local ins = luasnip.insert_node
local func = luasnip.function_node
-- local c = luasnip.choice_node
-- local d = luasnip.dynamic_node
@@ -67,7 +67,7 @@ for _, name in ipairs({ 'fixme', 'todo', 'hack', 'warn', 'note' }) do
snip(name, {
func(comment_prefix),
text(string.upper(name) .. ': '),
insert(0),
ins(0),
func(comment_suffix),
})
)