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
0
votes
2 answers

How do I add a custom colorization for VSCode's Output Panel

I have installed the Output Colorizer extension for VSCode. However, there aren't any instructions for it that I could find. All I know is the extension creates "text/log", "text/x-log", "text/x-code-output", "x-code-output" mime-types.. which…
MKANET
  • 573
  • 6
  • 27
  • 51
0
votes
0 answers

tmLanguage regex for capturing a function, that could hold many functions

My vscode extensions tmLanguage is not explicitly built for JavaScript, but I will use it as an example because it demonstrates the best use case. Take the following example: 1 function { 2 var p = 9; 3 4 function do() { 5 …
soulshined
  • 9,612
  • 5
  • 44
  • 79
0
votes
1 answer

VSCode Syntax Highlighting Problem: positive lookbehind does not work with whitespace

I am working on a custom language syntax highlighting extension for VSCode. I am running into a problem where lookbehinds are behaving strangely when used next to whitespaces. Example of code I want to highlight: variableName…
cdpautsch
  • 1,769
  • 3
  • 13
  • 24
0
votes
1 answer

TextMate grammar not having any matches on VS Code

I am writing a TextMate grammar to extend the syntax highlighting capabilities on Markdown language using Visual Studio Code. The expected outcome is something like what is achieved with Fabio's vscode-highlight, but I was looking for something more…
0
votes
1 answer

Comment Line in tmLanguage starts with .* TextMate Grammar Syntax Highlight

I am working on my own Syntax Highlighting extension for VS code and I have comment lines that start with ".*" which I want to highlight. For code I have: "comment": { "patterns": [{ "name": "comment.line.as", "match": …
0
votes
0 answers

VS Code Custom Extension Output Regex Errors

I'm trying to create a custom extension for a new language and find the regex flavors/options are not well documented in my opinion. I've found the same links to a github issue left on other SO questions, but all the discussion provides is that VS…
soulshined
  • 9,612
  • 5
  • 44
  • 79
0
votes
1 answer

What's the regular expression for capturing something surrounded by asterisks inside a comment?

I'm trying to modify an existing language definition that defines comments like this: match (#) .*$\n? name comment.line.number-sign.myLanguage
nachocab
  • 13,328
  • 21
  • 91
  • 149
0
votes
1 answer

VSCode Language Extension

I am building a custom language extension, and am having issues with lineComment in language-configuration.json. My language, oddly, uses "@@" as a line Comment, and I cannot get this to work. I have tried @@, @@, and so on. Any tips? (Updated from…
Rook
  • 11
  • 3
0
votes
1 answer

Correctly scoping quoted (string) constants in tmLanguage?

I am the author and maintainer of WoW Bundle for Visual Studio Code. In Blizzard's World of Warcraft API, many constants like events names, widgets scripts handlers or certain function parameters are strings. Those strings can be single- or…
0
votes
1 answer

Automated testing for tmLanguage and sublime-syntax files?

Is it possible to create automated tests for a *.tmLanguage or *.sublime-syntax file? What is the best practices for doing that?
user619271
  • 4,766
  • 5
  • 30
  • 35
0
votes
1 answer

How can I extend existing tmLanguage Colorizer/ Syntax highlighter?

I'm trying to extend https://github.com/dzannotti/vscode-babel/blob/master/syntaxes/Babel%20Language.json but all my attempts just result in a complete override, leaving the text blank. I'd rather not be a jerk and just copy the code into my…
0
votes
2 answers

How to match operator-separated strings in Sublime Package Development YAML tmlanguage

I am making a syntax definition for a custom-made language in sublime text 2 using PackageDevelopment's .YAML-tmLanguage. For now I want my syntax to identify strings to non strings. sample line of code: string name = "Chuck Norris"; string message…
catzilla
  • 1,901
  • 18
  • 31
0
votes
1 answer

Textmate: All text within begin and end capture is not colored/matched

So I'm able to match/color {{#if media.isMobile}} and it's end tag {{/if}}. But everything in between the blocks is just regular text now (Before it had nice html coloring). So how do I get the content inbetween the captures to be captured using the…
0
votes
1 answer

Can I use a existed .tmLanguage file when I writing my own .tmLanguage file?

I am writing a .tmLanguage file to highlight the markdown file(.md), and there are some cpp codes in the markdown files. I want use the c++.tmLanguage (in Packages\C++) to solve the syntax problem. How can I do it?
Qing Ye
  • 11
  • 1
0
votes
1 answer

SublimeText3 prevent backslash from escaping in quoted strings

I have created a tmlanguage file for a specialized language. This language allows backslashes to be used in strings and it does not escape them. So when I create the variable: Path = 'C:\Temp\'; Sublime thinks that the quote is escaped and then…
user3072517
  • 513
  • 1
  • 7
  • 21