mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
Refactor all the custom modules into better structures. Clear separation of keybindings that belong to cusstom modules. Added custom snippets and vsc snippets.
This commit is contained in:
17
snippets/go.lua
Normal file
17
snippets/go.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
return {
|
||||
s("cfo", { -- check for error
|
||||
t("if err != nil {"), t({ "", "\t" }),
|
||||
i(1, "return err"),
|
||||
t({ "", "}" })
|
||||
}),
|
||||
s("struct", {
|
||||
t("type "), i(1, "MyStruct"), t(" struct {"),
|
||||
t({ "", "\t" }), i(2, "Field type"),
|
||||
t({ "", "}" })
|
||||
}),
|
||||
}
|
||||
Reference in New Issue
Block a user