-
-
Notifications
You must be signed in to change notification settings - Fork 231
/
snippets.go
100 lines (98 loc) · 2.74 KB
/
snippets.go
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package proxy
import lsp "github.com/a-h/protocol"
var htmlSnippets = []lsp.CompletionItem{
{
Label: "<?>",
InsertText: `${1}>
${0}
</${1}>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "a",
InsertText: `a href="${1:}">${2:}</a>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "button",
InsertText: `button type="button" ${1:}>${2:}</button>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "div",
InsertText: `div>
${0}
</div>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "p",
InsertText: `p>
${0}
</p>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "head",
InsertText: `head>
${0}
</head>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "body",
InsertText: `body>
${0}
</body>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "title",
InsertText: `title>${0}</title>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h1",
InsertText: `h1>${0}</h1>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h2",
InsertText: `h2>${0}</h2>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h3",
InsertText: `h3>${0}</h3>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h4",
InsertText: `h4>${0}</h4>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h5",
InsertText: `h5>${0}</h5>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
{
Label: "h6",
InsertText: `h6>${0}</h6>`,
Kind: lsp.CompletionItemKind(lsp.CompletionItemKindSnippet),
InsertTextFormat: lsp.InsertTextFormatSnippet,
},
}