Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "renders-jsdoc-syntax",
"displayName": "Renders JSDoc Syntax",
"description": "Syntax highlighting for @renders and @transparent JSDoc annotations used by eslint-plugin-react-render-types",
"version": "0.1.0",
"publisher": "horusgoul",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/HorusGoul/eslint-plugin-react-render-types.git",
"directory": "vscode-extension"
},
"engines": {
"vscode": "^1.60.0"
},
"categories": ["Programming Languages"],
"contributes": {
"grammars": [
{
"scopeName": "renders.jsdoc.injection",
"path": "./syntaxes/renders-jsdoc.injection.tmLanguage.json",
"injectTo": ["source.ts", "source.tsx", "source.js", "source.jsx"]
}
]
}
}
35 changes: 35 additions & 0 deletions vscode-extension/syntaxes/renders-jsdoc.injection.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"scopeName": "renders.jsdoc.injection",
"injectionSelector": "L:comment.block.documentation",
"patterns": [
{ "include": "#renders-with-type" },
{ "include": "#renders-without-type" },
{ "include": "#transparent-tag" }
],
"repository": {
"renders-with-type": {
"match": "((@)renders[?*]?!?)\\s*(\\{)([^}]*)(\\})",
"captures": {
"1": { "name": "storage.type.class.jsdoc" },
"2": { "name": "punctuation.definition.block.tag.jsdoc" },
"3": { "name": "punctuation.definition.bracket.curly.begin.jsdoc" },
"4": { "name": "entity.name.type.instance.jsdoc" },
"5": { "name": "punctuation.definition.bracket.curly.end.jsdoc" }
}
},
"renders-without-type": {
"match": "((@)renders[?*]?!?)(?=\\s|\\*/|$)",
"captures": {
"1": { "name": "storage.type.class.jsdoc" },
"2": { "name": "punctuation.definition.block.tag.jsdoc" }
}
},
"transparent-tag": {
"match": "((@)transparent)(?=\\s|\\*/|$)",
"captures": {
"1": { "name": "storage.type.class.jsdoc" },
"2": { "name": "punctuation.definition.block.tag.jsdoc" }
}
}
}
}