Im trying to create a simple language extension for visual studio code. I used the "yo code" to generate a language support extension. After adding my Language name, id, extension and etc, I keep getting this message "no grammar provided for < source. arc" when running the tm scope inspector in the extension debugging host even though vscode recognized the language.
Not sure what i can try at this point since the sample should work right off the bat
archsim.tmLanguage.json:
{
"name": "ArchsimC",
"scopeName": "source.arc",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "keyword.control.archsimc",
"match": "\\b(if|while|for|return)\\b"
},
]
},
"strings": {
"name": "string.quoted.double.archsimc",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.archsimc",
"match": "\\\\."
}
]
}
}
}
package.json:
{
"name": "languagetest",
"displayName": "LanguageTest",
"description": "language server test",
"version": "0.0.1",
"engines": {
"vscode": "^1.29.0"
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [
{
"id": "archsimc",
"aliases": [
"ArchsimC",
"archsimc"
],
"extensions": [
".arc"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "archsimc",
"scopeName": "source.arc",
"path": "./syntaxes/archsimc.tmLanguage.json"
}
]
}
}
test.arc
if(something)
{
return;
}
by running inspect TM scope on the "if" should point to the tmLanguage file based on what i have seen in vscode documentation.
Any ideas on what is the issue here and if im doing something wrong?