Create Custom Language in Visual Studio Code

前端 未结 3 371
时光说笑
时光说笑 2020-12-04 10:55

Is there a way to extend the supported languages/grammars in Visual Studio Code? I\'d like to add a custom language syntax, but I\'ve not been able to find any information o

3条回答
  •  感动是毒
    2020-12-04 11:45

    To extend Wosi's .tmLanguage answer, using a .tmLanguage file is optional. Using a regular .json is a perfectly valid and—in my opinion—better readable alternative.

    For an example, see VSCode_SQF: sqf.json

    Inside the package.json, you would only need to change the path from ./syntaxes/mylang.tmLanguage to ./syntaxes/mylang.json.

提交回复
热议问题