All Questions
Tagged with vscode-extensions tmlanguage
55 questions
0
votes
1
answer
34
views
Weird identifier problem in TMLanguage syntax highlighting for AS3
I've finished a basic TMLanguage grammar for AS3 only (testing it in Visual Studio Code), but I'm getting a weird highlighting with the snippet:
reviver = JSBridge.toJSFunction("");
For ...
0
votes
1
answer
36
views
Override package-defined tmLanguage.json in project
Let's say I have an extension installed in VS Code which defines a tmLanguage.json file for some programming language X. I want to override this definition for a particular project.
My two questions ...
0
votes
2
answers
86
views
textmate language multiline pattern for trailing commas
Going completely insane trying to write a textmate pattern to catch trailing commas. Commas are trailing if they are followed by any amount of whitespace or newlines and then a closing parenthesis ).
...
1
vote
1
answer
392
views
How to write an syntax highlight injection for vscode?
I am trying to write an injection grammar for pug to get JS and scss highlighting in the content of certain mixin calls.
//- Example Pug file
+module.
const myVar = {};
I'd like the contents to be ...
0
votes
1
answer
754
views
How to highlight syntax of block and inline comments in VSCode extensions?
This is my goal to achieve:
This is what I get:
My little syntax highlighting vscode extension looks like this:
package.json (significant excerpt)
"contributes": {
"languages"...
0
votes
1
answer
159
views
How to make a new syntax highlight in vscode
I am tring to make a new programming language called 'ZE' so i made some basics and i am tring to make the syntax hightlight so i learned the basics from heretext
and made the syntaxes using yo code ...
2
votes
1
answer
116
views
How do we tell a tmlanguage that a symbol (\\) means the next line should be read as a continuation of the current one?
The grammar allows for \ continuation line marker, and i'm unable to carry the current scope of my grammar onto the next line:
The 'set' command allows for multiple option, 'args' being one. 'set ...
2
votes
0
answers
149
views
tmLanguage: how to match custom patterns in match
I'm developing a VS Code extension for a small language that I made.
In my lang.tmLanguage.json,
let's say that in the repository I have defined patterns #A and #B.
I want to create the following ...
0
votes
1
answer
165
views
fstring quotes scope vscode theme
I'm using a vscode customized theme that I changed to fit my needs, which I based on github dark for scopes. I'm finally in a spot I find it nice looking but I have a problem with fstring quotes, they ...
0
votes
1
answer
545
views
Custom language vscode extension syntax highlighting for variables and function call
I'm working on vscode extension for custom language. I've developed tmlangauge.json for syntax highlighting keywords and operators.
I find it a hard time to add syntax highlighting for variables and ...
2
votes
1
answer
854
views
Nested patterns in tmLanguage.json - how to match first keyword occurrence only?
I'm confused how nested patterns work in tmLanguage.json
When I have the following code:
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json&...
1
vote
1
answer
245
views
Match beginning of a line and beginning of remain line
I'm trying come up with syntax highlighter that would match beginning of the line (timestamp) and then beginning of the remaining line.
For example:
12:34:56.789 some1 text some2 other text
some3 text ...
0
votes
0
answers
129
views
Why does `captures` not work in tmLanguage when the capture groups are too complex?
I'm wondering why captures isn't able to determine the capture groups when they get too complex.
I have created the following regex, and it only matches the first group.
(type)(((( |\t))|((\/\*(([^\*\/...
2
votes
1
answer
1k
views
TMLanguage, what does captures do?
I am working on a tm language project for vscode and I'm wondering what the captures property on a pattern does exactly.
I can't seem to figure out what the indexes of the captures object stand for ...
7
votes
0
answers
746
views
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 ...