Skip to content

Commit

Permalink
feat(vscode): add syntax highlighting for log files
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Jan 1, 2023
1 parent 9f7f847 commit 105397b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
20 changes: 20 additions & 0 deletions vscode/fjage-log.tmLanguage.json
@@ -0,0 +1,20 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "fjage-log",
"patterns": [{ "include": "#entry" }],
"repository": {
"entry": {
"patterns": [{
"match": "^([0-9]{10})([0-9]{3})\\|([A-Z]+)\\|([^\\|]+)\\|",
"captures": {
"1": { "name": "markup.changed.fjage-log" },
"2": { "name": "comment.block.fjage-log" },
"3": { "name": "keyword.fjage-log" },
"4": { "name": "comment.block.fjage-log" }
}
}
]
}
},
"scopeName": "source.fjage-log"
}
24 changes: 24 additions & 0 deletions vscode/language-configuration.json
@@ -0,0 +1,24 @@
{
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
// symbols that that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
21 changes: 21 additions & 0 deletions vscode/package.json
@@ -0,0 +1,21 @@
{
"name": "fjage-log",
"displayName": "Fjåge log syntax",
"description": "Syntax highlighting for fjåge log files.",
"version": "0.0.1",
"publisher": "Mandar Chitre",
"engines": { "vscode": "^1.74.0" },
"categories": [ "Languages" ],
"contributes": {
"languages": [{
"id": "fjage-log",
"extensions": [],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "fjage-log",
"scopeName": "source.fjage-log",
"path": "./fjage-log.tmLanguage.json"
}]
}
}

0 comments on commit 105397b

Please sign in to comment.