mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Playing around with lazy-nvim and reworking my nvim config
This commit is contained in:
34
nvim/lazynvim/snippets/lua.lua
Normal file
34
nvim/lazynvim/snippets/lua.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Setup snippets here.
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local ms = ls.multi_snippet
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local t = ls.text_node
|
||||
|
||||
ls.add_snippets("lua", {
|
||||
-- Setup a new snippet file.
|
||||
s("sf", {
|
||||
t({
|
||||
"-- Setup snippets.",
|
||||
'local ls = require("luasnip")',
|
||||
"local s = ls.snippet",
|
||||
"local sn = ls.snippet_node",
|
||||
"local ms = ls.multi_snippet",
|
||||
"local i = ls.insert_node",
|
||||
"local f = ls.function_node",
|
||||
"local c = ls.choice_node",
|
||||
"local t = ls.text_node",
|
||||
"-- Add snippets",
|
||||
}),
|
||||
t('ls.add_snippets("'),
|
||||
i(1, "<file-type>"),
|
||||
t({
|
||||
'", {',
|
||||
"\t-- Define snippets here.",
|
||||
"})",
|
||||
}),
|
||||
}),
|
||||
})
|
||||
Reference in New Issue
Block a user