Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@
},
// "gulp.autoDetect": "on",
"typescript.tsdk": "./node_modules/typescript/lib"
,
"react-native-tools.logHighlight.enabled": true,
"files.associations": {
"*.rn-output": "rn-output-log"
}
}
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
],
"main": "./dist/rn-extension",
"contributes": {
"languages": [
{
"id": "rn-output-log",
"aliases": ["RN Output Log"],
"extensions": [".rn-output"]
}
],
"walkthroughs": [
{
"id": "RNTGetStarted",
Expand Down Expand Up @@ -1163,6 +1170,13 @@
}
}
],
"grammars": [
{
"language": "rn-output-log",
"scopeName": "react-native-tools-output-simple",
"path": "./syntaxes/rn-output-simple.tmGrammar.json"
}
],
"configuration": {
"type": "object",
"title": "%reactNative.configuration.title%",
Expand Down Expand Up @@ -1366,6 +1380,12 @@
],
"scope": "resource",
"default": "npm"
},
"react-native-tools.logHighlight.enabled": {
"description": "Enable lightweight syntax highlighting for extension output logs. When enabled, applies color highlighting to common log keywords (ERROR, WARN, INFO, DEBUG, SUCCESS, etc.). This feature is disabled by default to avoid performance issues.",
"type": "boolean",
"scope": "resource",
"default": false
}
}
}
Expand Down
70 changes: 70 additions & 0 deletions syntaxes/rn-output-simple.tmGrammar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"scopeName": "react-native-tools-output-simple",
"patterns": [
{
"include": "#keywords-error"
},
{
"include": "#keywords-warn"
},
{
"include": "#keywords-info"
},
{
"include": "#keywords-debug"
},
{
"include": "#keywords-success"
},
{
"include": "#constants"
},
{
"include": "#string-quoted"
},
{
"include": "#url-simple"
},
{
"include": "#numeric-decimal"
}
],
"repository": {
"keywords-error": {
"match": "\\b(ERROR|error|FAILED|failed|FAILURE|failure|Exception|exception|FATAL|fatal|Fatal)\\b",
"name": "markup.bold invalid.illegal rnt.output.error"
},
"keywords-warn": {
"match": "\\b(WARN|warn|WARNING|warning)\\b",
"name": "markup.bold markup.deleted rnt.output.warn"
},
"keywords-info": {
"match": "\\b(INFO|info|INFORMATION|information)\\b",
"name": "markup.bold markup.inserted rnt.output.info"
},
"keywords-debug": {
"match": "\\b(DEBUG|debug)\\b",
"name": "markup.bold markup.changed rnt.output.debug"
},
"keywords-success": {
"match": "\\b(SUCCESS|success|BUILD SUCCESSFUL|BUILD PASSED|PASSED|passed)\\b",
"name": "markup.bold markup.inserted rnt.output.success"
},
"constants": {
"match": "\\b(true|false|null|undefined|NaN)\\b",
"name": "constant.language rnt.output.constant"
},
"string-quoted": {
"match": "['\"]([^'\"]{0,50})['\"]",
"name": "string.quoted rnt.output.string"
},
"url-simple": {
"match": "https?://[^\\s]+",
"name": "markup.underline.link rnt.output.url"
},
"numeric-decimal": {
"match": "\\b\\d+(?:\\.\\d+)?\\b",
"name": "constant.numeric rnt.output.numeric"
}
}
}
Loading