46 lines
874 B
Lua
46 lines
874 B
Lua
local ls = require 'luasnip'
|
|
local s = ls.snippet
|
|
local t = ls.text_node
|
|
local i = ls.insert_node
|
|
local f = ls.function_node
|
|
|
|
return {
|
|
s('du', { t 'console.log(', i(0), t ');' }),
|
|
|
|
s('vue', {
|
|
t { '<template>', '' },
|
|
t { '', '</template>', '', '', '<script setup>', '' },
|
|
i(0),
|
|
t { '', '</script>', '', '', '<style scoped>', '', '.o-share-page {', '}', '', '</style>' },
|
|
}),
|
|
|
|
s('fun', {
|
|
t 'function ',
|
|
i(1),
|
|
t '(',
|
|
i(2),
|
|
t ') {',
|
|
t { '', ' ' },
|
|
i(0),
|
|
t { '', '}' },
|
|
}),
|
|
|
|
s('afun', {
|
|
t 'async function ',
|
|
i(1),
|
|
t '(',
|
|
i(2),
|
|
t ') {',
|
|
t { '', ' ' },
|
|
i(0),
|
|
t { '', '}' },
|
|
}),
|
|
|
|
s('()', {
|
|
t '() => {',
|
|
t { '', ' ' },
|
|
i(0),
|
|
t { '', '}' },
|
|
}),
|
|
}
|