Skip to content

Commit

Permalink
improved syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Ward committed Oct 18, 2024
1 parent 47472dc commit adc02d1
Showing 1 changed file with 49 additions and 8 deletions.
57 changes: 49 additions & 8 deletions src/packs/lsp_server_metta/vscode/syntaxes/mettalanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,64 @@
"include": "#variables"
},
{
"include": "#keywords"
"include": "#operatorkeywords"
},
{
"include": "#controlkeywords"
},
{
"include": "#comment"
},
{
"include": "#strings"
},
{
"include": "#character"
},
{
"include": "#number"
}
],
"repository": {
"keywords": {
"patterns": [{
"name": "no.color.metta",
"match": "[a-zA-Z_][a-zA-Z_\\-*0-9]*!?"
}]
},
"operatorkeywords": {
"patterns": [{
"name": "keyword.operator.metta",
"match": "=="
}]
},
"controlkeywords": {
"patterns": [{
"name": "keyword.control.metta",
"match": "[a-zA-Z_][a-zA-Z_\\-0-9]*"
"match": ":|=|\\->|!"
}]
},
"doctag" : {
"patterns": [
{
"name": "doctag.metta",
"match": "\\x40[a-zA-Z_][a-zA-Z_\\-\\*0-9]*"
"name": "keyword.other.metta",
"match": "\\x40[a-zA-Z_][a-zA-Z_\\-*0-9]*!?"
}
]
},
"namespace" : {
"patterns": [
{
"name": "namespace.metta",
"match": "\\x26[a-zA-Z_][a-zA-Z_\\-\\*0-9]*"
"name": "variable.language.metta",
"match": "\\x26[a-zA-Z_][a-zA-Z_\\-*0-9]*!?"
}
]
},
"variables" : {
"patterns": [
{
"name": "variable.metta",
"match": "\\x24[a-zA-Z_][a-zA-Z_\\-\\*0-9]*"
"name": "variable.other.metta",
"match": "\\x24[a-zA-Z_][a-zA-Z_\\-*0-9]*!?"
}
]
},
Expand All @@ -71,6 +92,26 @@
"match": "\\\\."
}
]
},
"character":{
"begin": "'",
"end": "'",
"name": "string.quoted.single.metta",
"patterns": [
{
"match": "\\\\.",
"name": "constant.character.escape.metta"
}
]
},
"number": {
"patterns": [
{
"name": "constant.numeric.metta",
"begin": ";",
"match": "-?[0-9]+(.[0-9]+)?"
}
]
}
},
"scopeName": "source.metta"
Expand Down

0 comments on commit adc02d1

Please sign in to comment.