summaryrefslogtreecommitdiffhomepage
path: root/.exrc
blob: 027ee82e53f5a11854c2a9112fbc20c65ad61cd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
set tw=80

nnoremap M :make<CR>

lua <<EOF
local ls = require('luasnip')
local fmt = require('luasnip.extras.fmt').fmt
local f = ls.function_node
local i = ls.insert_node
local s = ls.s

ls.add_snippets('gsp', {
	s('entry', fmt(
		[[
			__entry([<>], [
				p {-
					<>
				}
			])
		]],
		{
			f(function() return os.date('%d-%m-%Y') end),
			i(0),
		},
		{
			delimiters = '<>',
		}
	))
})
EOF