Skip to content

Commit 451ef4e

Browse files
committed
fix: Nuxt components snippets activation
1 parent 7ee551a commit 451ef4e

File tree

4 files changed

+35
-25
lines changed

4 files changed

+35
-25
lines changed

package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@
10431043
],
10441044
"snippets": [
10451045
{
1046-
"language": "vue",
1046+
"language": "html",
10471047
"path": "./snippets/nuxt/components.json"
10481048
},
10491049
{
@@ -1068,11 +1068,19 @@
10681068
},
10691069
{
10701070
"language": "javascript",
1071-
"path": "./snippets/nitro/imports.json"
1071+
"path": "./snippets/nitro/utils.json"
1072+
},
1073+
{
1074+
"language": "typescript",
1075+
"path": "./snippets/nitro/utils.json"
1076+
},
1077+
{
1078+
"language": "javascript",
1079+
"path": "./snippets/nitro/boilerplates.json"
10721080
},
10731081
{
10741082
"language": "typescript",
1075-
"path": "./snippets/nitro/imports.json"
1083+
"path": "./snippets/nitro/boilerplates.json"
10761084
}
10771085
]
10781086
},

snippets/Nuxt/components.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@
3333
],
3434
"description": "Nuxt | NuxtErrorBoundary"
3535
},
36-
"Nuxt | Template with ID": {
37-
"prefix": "templateWithId",
38-
"body": ["<template #$1>", " $2", "</template>"],
39-
"description": "Nuxt | Template with ID"
40-
},
4136
"Nuxt | NuxtLoadingIndicator": {
4237
"prefix": "nuxtLoadingIndicator",
4338
"body": ["<NuxtLoadingIndicator $1/>"],
@@ -77,5 +72,10 @@
7772
"prefix": "pageKey",
7873
"body": ["page-key=\"$1\""],
7974
"description": "Nuxt | pageKey"
75+
},
76+
"Nuxt | Template with ID": {
77+
"prefix": "templateWithId",
78+
"body": ["<template #$1>", " $2", "</template>"],
79+
"description": "Nuxt | Template with ID"
8080
}
8181
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"defineNitroPlugin": {
2+
"defineNitroPlugin": {
33
"prefix": "defineNitroPlugin",
44
"description": "Define Nitro Plugins",
55
"body": [
@@ -9,21 +9,6 @@
99
],
1010
"isFileTemplate": true
1111
},
12-
"getRouteRules": {
13-
"prefix": "getRouteRules",
14-
"description": "Get Route Rules",
15-
"body": ["const ${1:routeRules} = getRouteRules($2);"]
16-
},
17-
"useNitroApp": {
18-
"prefix": "useNitroApp",
19-
"description": "Use Nitro App",
20-
"body": ["const ${1:nitroApp} = useNitroApp();"]
21-
},
22-
"useStorage": {
23-
"prefix": "useStorage",
24-
"description": "Use Storage",
25-
"body": ["const ${1:storage} = useStorage();"]
26-
},
2712
"defineRenderHandler": {
2813
"prefix": "defineRenderHandler",
2914
"body": [
@@ -35,4 +20,4 @@
3520
],
3621
"description": "defineRenderHandler"
3722
}
38-
}
23+
}

snippets/nitro/utils.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"getRouteRules": {
3+
"prefix": "getRouteRules",
4+
"description": "Get Route Rules",
5+
"body": ["const ${1:routeRules} = getRouteRules($2);"]
6+
},
7+
"useNitroApp": {
8+
"prefix": "useNitroApp",
9+
"description": "Use Nitro App",
10+
"body": ["const ${1:nitro} = useNitroApp();"]
11+
},
12+
"useStorage": {
13+
"prefix": "useStorage",
14+
"description": "Use Storage",
15+
"body": ["const ${1:storage} = useStorage();"]
16+
}
17+
}

0 commit comments

Comments
 (0)