mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
nvim: go snippets
This commit is contained in:
parent
f19e05528d
commit
8858805258
1 changed files with 15 additions and 0 deletions
15
nvim/snippets/go.lua
Normal file
15
nvim/snippets/go.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
local ls = require('luasnip')
|
||||
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
return {
|
||||
-- Test function
|
||||
s("tst", {
|
||||
t("func Test"), i(1, "Module"), t("_"), i(2, "Name"), t({"(t *testing.T) {", ""}),
|
||||
i(0),
|
||||
t({"", "}"})
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue