Questions tagged [tmlanguage]

The .tmLanguage TextMate language format describes language grammars, enabling text editors like TextMate, Sublime Text, and VS Code to provide syntax highlighting.

The -based .tmLanguage format contains expressions to capture particular features of a programming language, such as keywords, variables, strings, etc. and names them with one or more scopes.

107 questions
83
votes
5 answers

Create Custom Language in Visual Studio Code

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…
Rick Strahl
  • 17,302
  • 14
  • 89
  • 134
12
votes
2 answers

VS Code - highlight some variables with TextMate

VS Code 1.15 added support for TextMate grammar rules. I want to highlight some variables in JavaScript with these rules: self, me. How can I do this?
spyke
  • 385
  • 3
  • 12
12
votes
3 answers

How to create a simple custom language colorization to VS Code

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…
emilast
  • 559
  • 1
  • 5
  • 11
11
votes
1 answer

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

In the tmTheme file for my current text editor 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,…
9
votes
1 answer

How do I add a bare-bones syntax to VSCode?

I'd like to add the simplest possible (mvp) language grammar and syntax highlighting to vscode. It's (imo) a mess of TextMate docs (two different versions apply) and random internet advice. I can't make a basic example work, or find one. How would…
SimplGy
  • 20,079
  • 15
  • 107
  • 144
8
votes
1 answer

Add an operator to visual studio code theme in settings.json

I'm trying to add the words and, or, not (for Lua) to the Visual Studio Code theme called "Visual Studio Dark" that is included in the vscode regular download and in the "select color theme" screen is called "Dark (Visual Studio)" I've searched…
matjojo
  • 113
  • 2
  • 8
7
votes
1 answer

Where can I find an official complete list of scopes to go with textMateRules for C#/.NET core in Visual Studio Code?

So far I checked out a request at https://github.com/Microsoft/vscode/issues/6056 which was closed based on Complete list of theme elements to colorize?. This in turn send to https://code.visualstudio.com/docs/getstarted/themes and…
mireazma
  • 526
  • 1
  • 8
  • 20
7
votes
1 answer

Can a language in Visual Studio Code be extended?

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":…
Matt Miller
  • 162
  • 1
  • 11
7
votes
1 answer

Creating Visual Studio Code extension for syntax highlighting of a custom language

I'm trying to create an extension in Visual Studio Code so as to enable syntax highlighting for a custom language. I found the helpful advice offered by @Wosi here: Create Custom Language in Visual Studio Code. Based on that I attempted to the…
5
votes
0 answers

How to inject a TextMate grammar to a Markdown heading in VS Code?

I want to select [ ] for syntax highlighting within a markdown file in VS Code. I can target [ ] using the following regex: (?<=\s)\]|\[(?=\s). However [ ] doesn't get matched when it is part of a heading. As a minimal example, in the package.json I…
Mihai
  • 2,807
  • 4
  • 28
  • 53
5
votes
1 answer

Is there a way to use a tmLanguage grammar to extend vscode integrated markdown extensions syntax highlighting?

I am working on a language extension for vscode. I defined a tmLanguage file and everything works nicely. In the hover feature, using vscode.MarkdownString.appendCodeblock() the markdown is being interpreted correctly and syntax highlighting for my…
5
votes
1 answer

How to reference an injected grammar within a custom VSCode language

Prefacing the below. A demo project illustrating this issue can be found at: https://github.com/kirksl/so60384141 I can reference an injected grammar within a native VSCode language specifying this (package.json) "grammars": [ …
5
votes
1 answer

How do TextMate grammars and themes work with VSCode?

VSCode is built on top of MonacoEditor which doesn't support Textmate grammars and themes. But somehow VSCode made it possible. I am curious how VSCode is able to do this. I am asking because I am making a code editor (based on Monaco) with TextMate…
REDDY PRASAD
  • 1,309
  • 2
  • 14
  • 29
5
votes
1 answer

Running Julia from Textmate

I'm using Textmate as my code editor, and I would like to be able to run Julia from it. I have no problems saving the .jl file and sending it to the Terminal (via the Julia bundle in Textmate), but I was wondering if it is possible to make the…
4
votes
0 answers

Extend markdown in vscode tmLanguage

I'm trying to add some new coloring to VS code markdown. Package.json "contributes": { "grammers": [ { "scopeName": "markdown.rise", "path": "./syntaxes/markdown.tmLanguage.json", "injectTo": [ …
user1613512
  • 3,590
  • 8
  • 28
  • 32
1
2 3 4 5 6 7 8