new snippet for golang

This commit is contained in:
s-kontrol 2025-06-26 14:32:25 -03:00
parent c448f89268
commit def2a93c3f
1 changed files with 2 additions and 7 deletions

View File

@ -1,16 +1,10 @@
local ls = require 'luasnip'
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
return {
s('main', {
t { 'func main() {', '\t' },
i(1),
t { '', '}' },
}),
s('reverseString', {
s('reverseString!', {
t {
'func reverseString(s string) string {',
'\trunes := []rune(s)',
@ -21,4 +15,5 @@ return {
'}',
},
}),
-- new snipp
}