Skip to content

Commit 5371dae

Browse files
authored
feat: enhance nuxtrc and nuxtignore syntanx and lang conf
1 parent f05b4ac commit 5371dae

7 files changed

+41
-28
lines changed

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"extensions": [
4242
".log"
4343
],
44-
"configuration": "./log.configuration.json",
44+
"configuration": "./log.langConfiguration.json",
4545
"mimetypes": [
4646
"log",
4747
"text/log",
@@ -57,7 +57,8 @@
5757
],
5858
"extensions": [
5959
".nuxtignore"
60-
]
60+
],
61+
"configuration": "./syntaxes/nuxtignore.langConfiguration.json"
6162
},
6263
{
6364
"id": "nuxtrc",
@@ -66,7 +67,8 @@
6667
],
6768
"extensions": [
6869
".nuxtrc"
69-
]
70+
],
71+
"configuration": "./syntaxes/nuxtrc.langConfiguration.json"
7072
}
7173
],
7274
"configurationDefaults": {
@@ -80,17 +82,17 @@
8082
{
8183
"language": "Log",
8284
"scopeName": "code.log",
83-
"path": "./syntaxes/log.tmLanguage.json"
85+
"path": "./syntaxes/log.tmConfiguration.json"
8486
},
8587
{
8688
"language": "nuxtrc",
8789
"scopeName": "source.nuxtrc",
88-
"path": "./syntaxes/nuxtrc.tmLanguage.json"
90+
"path": "./syntaxes/nuxtrc.tmConfiguration.json"
8991
},
9092
{
9193
"language": "nuxtignore",
9294
"scopeName": "source.nuxtignore",
93-
"path": "./syntaxes/nuxtignore.tmLanguage.json"
95+
"path": "./syntaxes/nuxtignore.tmConfiguration.json"
9496
}
9597
],
9698
"viewsContainers": {
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
}
5+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"scopeName": "source.nuxtignore",
4+
"patterns": [
5+
{
6+
"match": "^[^#\\s].*$",
7+
"name": "string.path.nuxtignore"
8+
},
9+
{
10+
"match": "^\\s*#.*$",
11+
"name": "comment.line"
12+
}
13+
],
14+
"fileTypes": [".nuxtignore"]
15+
}

syntaxes/nuxtignore.tmLanguage.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
}
5+
}

syntaxes/nuxtrc.tmLanguage.json renamed to syntaxes/nuxtrc.tmConfiguration.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"fileTypes": [".nuxtrc"],
4+
"name": "nuxtrc",
25
"scopeName": "source.nuxtrc",
36
"patterns": [
47
{
5-
"include": "#key-value-pair"
6-
}
7-
],
8-
"repository": {
9-
"key-value-pair": {
108
"match": "^(\\s*)([a-zA-Z_][\\w-]*(?:\\.[a-zA-Z_][\\w-]*)*)\\s*=\\s*([^\\n]*)$",
119
"captures": {
1210
"2": {
@@ -33,6 +31,10 @@
3331
]
3432
}
3533
}
34+
},
35+
{
36+
"match": "^\\s*#.*$",
37+
"name": "comment.line"
3638
}
37-
}
39+
]
3840
}

0 commit comments

Comments
 (0)