tmlanguage

Can a language in Visual Studio Code be extended?

回眸只為那壹抹淺笑 提交于 2019-12-05 11:25:25
Scenario I have JSON files that describe a series of tasks to be carried out, where each task can refer to other tasks and objects in the JSON file. { "tasks": [ { "id": "first", "action": "doSomething()", "result": {} }, { "id": "second", "action": "doSomething(${id:first.result})", "result": {} }, ] } I'd like to have both JSON schema validation and custom language text effects like keyword coloring and even "Go to definition" support within strings in the JSON. What I can do I can create an extension that specifies a JSON schema for a file extension "*.foo.json". This gives schema

How to create a simple custom language colorization to VS Code

瘦欲@ 提交于 2019-11-30 09:05:35
I'm trying to create a simple colorization for log files, now that it's possible include custom languages in Code (I'm on 0.9.2). I have created a simple .tmLanguage file for colorizing the letter 'q', just for starting up, but have been unsuccessful. My new language, log , is associated correctly with the file extension and I can also select it manually from inside Code, but no coloring takes places. I have a feeling it has to do with what "scope" I associate my pattern with, but I'm not sure. Is there a list of valid scope to choose from? Initially I thought I'd use something general, such

How to create a simple custom language colorization to VS Code

五迷三道 提交于 2019-11-29 13:27:51
问题 I'm trying to create a simple colorization for log files, now that it's possible include custom languages in Code (I'm on 0.9.2). I have created a simple .tmLanguage file for colorizing the letter 'q', just for starting up, but have been unsuccessful. My new language, log , is associated correctly with the file extension and I can also select it manually from inside Code, but no coloring takes places. I have a feeling it has to do with what "scope" I associate my pattern with, but I'm not

Where can I find a list of all possible keys for tm-themes for syntax highlighting?

限于喜欢 提交于 2019-11-28 01:22:25
In the tmTheme file for my current text editor theme there are a number of options, including the ones in the code below. Is there a list somewhere that defines all possible tags that could be included in this list (eg. background , inactiveSelection , findHighlight , etc)? <dict> <key>background</key> <string>#1a1a1a</string> <key>caret</key> <string>#B6ECF9AF</string> <key>foreground</key> <string>#ecf0f1</string> <key>invisibles</key> <string>#F3FFB51A</string> <key>lineHighlight</key> <string>#2a2a2a</string> <key>selection</key> <string>#e74c3c55</string> <key>selectionForeground</key>

Create Custom Language in Visual Studio Code

五迷三道 提交于 2019-11-27 11:56:08
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 on how language services are provided. Can anybody point to any references or even examples of existing language implementations? Wosi It's possible with the new version 0.9.0. There's an official documentation on how to add a custom language: https://github.com/Microsoft/vscode-docs/blob/0.9.0/release-notes/latest.md You need a .tmLanguage file for the language you want to add. You can find existing files e.g. on GitHub or

Where can I find a list of all possible keys for tm-themes for syntax highlighting?

我的梦境 提交于 2019-11-26 18:32:45
问题 In the tmTheme file for my current text editor theme there are a number of options, including the ones in the code below. Is there a list somewhere that defines all possible tags that could be included in this list (eg. background , inactiveSelection , findHighlight , etc)? <dict> <key>background</key> <string>#1a1a1a</string> <key>caret</key> <string>#B6ECF9AF</string> <key>foreground</key> <string>#ecf0f1</string> <key>invisibles</key> <string>#F3FFB51A</string> <key>lineHighlight</key>

Create Custom Language in Visual Studio Code

二次信任 提交于 2019-11-26 15:37:48
问题 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 on how language services are provided. Can anybody point to any references or even examples of existing language implementations? 回答1: It's possible with the new version 0.9.0. There's an official documentation on how to add a custom language: https://github.com/Microsoft/vscode-docs/blob/0.9.0/release-notes/latest.md You