-
Notifications
You must be signed in to change notification settings - Fork 93
chore: add vscode highlight extension #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set default behavior to automatically normalize line endings. | ||
* text=auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
*.vsix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// A launch configuration that launches the extension inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}" | ||
] | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
.gitignore | ||
vsc-extension-quickstart.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Change Log | ||
|
||
All notable changes to the "vscode-testing-library-render" extension will be documented in this file. | ||
|
||
## 0.0.1 | ||
|
||
- Initial release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# vscode-atl-render | ||
|
||
[Download link](https://marketplace.visualstudio.com/manage/publishers/timdeschryver/extensions/vscode-atl-render/hub?_a=acquisition) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"comments": { | ||
"blockComment": ["<!--", "-->"] | ||
}, | ||
"brackets": [ | ||
["<!--", "-->"], | ||
["<", ">"], | ||
["{", "}"], | ||
["(", ")"], | ||
["[", "]"] | ||
], | ||
"autoClosingPairs": [ | ||
{ "open": "{", "close": "}" }, | ||
{ "open": "[", "close": "]" }, | ||
{ "open": "(", "close": ")" }, | ||
{ "open": "'", "close": "'" }, | ||
{ "open": "\"", "close": "\"" }, | ||
{ "open": "<!--", "close": "-->", "notIn": ["comment", "string"] }, | ||
{ "open": "/**", "close": "*/", "notIn": ["string"] } | ||
], | ||
"surroundingPairs": [ | ||
{ "open": "'", "close": "'" }, | ||
{ "open": "\"", "close": "\"" }, | ||
{ "open": "`", "close": "`" }, | ||
{ "open": "{", "close": "}" }, | ||
{ "open": "[", "close": "]" }, | ||
{ "open": "(", "close": ")" }, | ||
{ "open": "<", "close": ">" } | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "vscode-atl-render", | ||
"displayName": "vscode-atl-render", | ||
"description": "HTML highlighting in ATL the render method", | ||
"version": "0.0.1", | ||
"publisher": "timdeschryver", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/testing-library/angular-testing-library.git" | ||
}, | ||
"homepage": "https://github.com/testing-library/angular-testing-library/blob/main/README.md", | ||
"engines": { | ||
"vscode": "^1.57.0" | ||
}, | ||
"categories": [ | ||
"Programming Languages" | ||
], | ||
"contributes": { | ||
"configuration": [ | ||
{ | ||
"id": "atl-render", | ||
"title": "Angular Testing Library Render", | ||
"properties": { | ||
"atl-render.format.enabled": { | ||
"type": "boolean", | ||
"description": "Enable/disable formatting of render template strings.", | ||
"default": true | ||
} | ||
} | ||
} | ||
], | ||
"grammars": [ | ||
{ | ||
"scopeName": "atl.render", | ||
"path": "./syntaxes/atl-render.json", | ||
"injectTo": [ | ||
"source.ts" | ||
], | ||
"embeddedLanguages": { | ||
"text.html": "html" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
"scopeName": "atl.render", | ||
"injectionSelector": "L:source.ts -comment -(string -text.html)", | ||
"name": "atl.render", | ||
"patterns": [ | ||
{ | ||
"include": "#renderMethod" | ||
} | ||
], | ||
"repository": { | ||
"renderMethod": { | ||
"name": "renderMethod", | ||
"begin": "(?x)(\\b(?:\\w+\\.)*(?:render)\\s*)(\\()", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "entity.name.function.ts" | ||
}, | ||
"2": { | ||
"name": "meta.brace.round.ts" | ||
} | ||
}, | ||
"end": "(\\))", | ||
"endCaptures": { | ||
"0": { | ||
"name": "meta.brace.round.ts" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#renderTemplate" | ||
} | ||
] | ||
}, | ||
"renderTemplate": { | ||
"contentName": "text.html", | ||
"begin": "\\G\\s*([`|'|\"])", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "string" | ||
} | ||
}, | ||
"end": "\\1", | ||
"endCaptures": { | ||
"0": { | ||
"name": "string" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "text.html.derivative" | ||
}, | ||
{ | ||
"include": "template.ng" | ||
} | ||
] | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it disallows line breaks between
render(
and the arguments.https://macromates.com/manual/en/language_grammars
How about just
?
BTW,

inline-template.ng
also disallows line breaks.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\\G
is "matching start position", so maybe it means\\G
is the same line ofrender(
.