mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim/cmp: load snippets per filetype
This commit is contained in:
parent
b6522ffbba
commit
14bfbece87
4 changed files with 50 additions and 111 deletions
|
|
@ -1 +1,17 @@
|
|||
vim.bo.expandtab = false
|
||||
|
||||
do
|
||||
local luasnip = require("luasnip")
|
||||
local s = luasnip.snippet
|
||||
local t = luasnip.text_node
|
||||
local cr = function() return t { "", "" } end
|
||||
local i = luasnip.insert_node
|
||||
|
||||
luasnip.add_snippets("go", {
|
||||
s("ie", {
|
||||
t("if err != nil {"), cr(),
|
||||
t("\t"), i(0), cr(),
|
||||
t("}"),
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue