-
Hi I try to make snippet to callout in markdown. local function show_callout(args, parent, user_args)
local result = nil
vim.ui.select({
'NOTE',
'ABSTRACT',
'SUMMARY',
'CHECK',
'IMPORTANT',
'EXAMPLE',
'QUESTION',
'ANSWER',
'FAQ',
'HELP',
'QUOTE',
'CITE',
'TIP',
'HINT',
'INFO',
'TODO',
'CAUTION',
'WARNING',
'DANGER',
'MISSING',
}, {
prompt = 'Select callouts:',
format_item = function (item)
return item
end
}, function (choice)
result = choice
end)
return result
end
local callout = s({
trig = ']!',
name = 'callout',
desc = 'select callout',
}, {
t({'> [!'}),
f(show_callout, {}),
t({']',''}),
t({'> '}), i(0,'')
})
table.insert(autosnippets, callout)
What I missed? |
Beta Was this translation helpful? Give feedback.
Answered by
wassimk
Jun 28, 2025
Replies: 1 comment 1 reply
-
Hi! I had the same problem. Here is a solution. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Jaehaks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I had the same problem. Here is a solution.