-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets.json
58 lines (56 loc) · 1.32 KB
/
snippets.json
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
{
// TypeScript
"Typescript Default Export Function": {
"prefix": "def",
"body": [
"const $TM_FILENAME_BASE = ($1) => {",
" return ($2);",
"}",
"",
"export default $TM_FILENAME_BASE;"
]
},
"Typescript Named Export Function": {
"prefix": "nef",
"body": ["export const $1 = ($2) => {", " return $3;", "}", ""]
},
// TypeScript React
"Typescript React Function Component": {
"prefix": "rfc",
"body": [
"type ${TM_FILENAME_BASE}Props = {",
"$1",
"}",
"",
"const $TM_FILENAME_BASE: React.FC<${TM_FILENAME_BASE}Props> = ({$2}) => {",
" return ($3);",
"}",
"",
"export default $TM_FILENAME_BASE;"
],
"description": "Typescript React Function Component"
},
// Markdown
"Markdown Article Front Matter": {
"prefix": "afm",
"body": [
"---",
"date: \"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE\"",
"title: \"$1\"",
"---"
],
"description": "Markdown Article Front Matter"
},
"Markdown Book Note Front Matter": {
"prefix": "bfm",
"body": [
"---",
"date: \"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE\"",
"title: \"$1\"",
"author: \"$2\"",
"description: \"$3\"",
"---"
],
"description": "Markdown Book Note Front Matter"
}
}