Skip to content

Commit

Permalink
feat: enhance nuxtrc and nuxtignore syntanx and lang conf
Browse files Browse the repository at this point in the history
  • Loading branch information
adhamfarrag authored May 12, 2024
1 parent f05b4ac commit 5371dae
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 28 deletions.
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"extensions": [
".log"
],
"configuration": "./log.configuration.json",
"configuration": "./log.langConfiguration.json",
"mimetypes": [
"log",
"text/log",
Expand All @@ -57,7 +57,8 @@
],
"extensions": [
".nuxtignore"
]
],
"configuration": "./syntaxes/nuxtignore.langConfiguration.json"
},
{
"id": "nuxtrc",
Expand All @@ -66,7 +67,8 @@
],
"extensions": [
".nuxtrc"
]
],
"configuration": "./syntaxes/nuxtrc.langConfiguration.json"
}
],
"configurationDefaults": {
Expand All @@ -80,17 +82,17 @@
{
"language": "Log",
"scopeName": "code.log",
"path": "./syntaxes/log.tmLanguage.json"
"path": "./syntaxes/log.tmConfiguration.json"
},
{
"language": "nuxtrc",
"scopeName": "source.nuxtrc",
"path": "./syntaxes/nuxtrc.tmLanguage.json"
"path": "./syntaxes/nuxtrc.tmConfiguration.json"
},
{
"language": "nuxtignore",
"scopeName": "source.nuxtignore",
"path": "./syntaxes/nuxtignore.tmLanguage.json"
"path": "./syntaxes/nuxtignore.tmConfiguration.json"
}
],
"viewsContainers": {
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions syntaxes/nuxtignore.langConfiguration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"comments": {
"lineComment": "#"
}
}
15 changes: 15 additions & 0 deletions syntaxes/nuxtignore.tmConfiguration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"scopeName": "source.nuxtignore",
"patterns": [
{
"match": "^[^#\\s].*$",
"name": "string.path.nuxtignore"
},
{
"match": "^\\s*#.*$",
"name": "comment.line"
}
],
"fileTypes": [".nuxtignore"]
}
16 changes: 0 additions & 16 deletions syntaxes/nuxtignore.tmLanguage.json

This file was deleted.

5 changes: 5 additions & 0 deletions syntaxes/nuxtrc.langConfiguration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"comments": {
"lineComment": "#"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"fileTypes": [".nuxtrc"],
"name": "nuxtrc",
"scopeName": "source.nuxtrc",
"patterns": [
{
"include": "#key-value-pair"
}
],
"repository": {
"key-value-pair": {
"match": "^(\\s*)([a-zA-Z_][\\w-]*(?:\\.[a-zA-Z_][\\w-]*)*)\\s*=\\s*([^\\n]*)$",
"captures": {
"2": {
Expand All @@ -33,6 +31,10 @@
]
}
}
},
{
"match": "^\\s*#.*$",
"name": "comment.line"
}
}
]
}

0 comments on commit 5371dae

Please sign in to comment.