唉, 又更新了一堆没啥用的

develop
yutent 2023-06-06 18:35:39 +08:00
parent 583b7586df
commit a3261162de
6 changed files with 35 additions and 209 deletions

View File

@ -32,9 +32,7 @@
],
"activationEvents": [
"onLanguage:javascript",
"onLanguage:typescript",
"onLanguage:javascriptreact",
"onLanguage:typescriptreact"
"onLanguage:javascriptreact"
],
"main": "./dist/main.js",
"contributes": {
@ -47,50 +45,35 @@
"grammars": [
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.ts.tsx",
"source.tsx"
"source.js"
],
"scopeName": "es6.inline.html",
"path": "./syntaxes/es6.inline.html.json",
"embeddedLanguages": {
"meta.embedded.block.html": "html",
"meta.template.expression.ts": "typescript"
"meta.template.expression.js": "javascript"
}
},
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.ts.tsx",
"source.tsx"
"source.js"
],
"scopeName": "es6.inline.css",
"path": "./syntaxes/es6.inline.css.json",
"embeddedLanguages": {
"meta.embedded.block.css": "css",
"meta.template.expression.ts": "typescript"
"meta.template.expression.js": "javascript"
}
},
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.ts.tsx",
"source.tsx"
"source.js"
],
"scopeName": "es6.inline.scss",
"path": "./syntaxes/es6.inline.scss.json",
"embeddedLanguages": {
"meta.embedded.block.css": "scss",
"meta.template.expression.ts": "typescript"
"meta.template.expression.js": "javascript"
}
}
]

View File

@ -6,12 +6,7 @@ import {
} from './providers/css.js'
import { HTMLHoverProvider, CSSHoverProvider } from './providers/hover.js'
import { CodeFormatterProvider } from './providers/formatting.js'
const selector = [
'typescriptreact',
'javascriptreact',
'typescript',
'javascript'
]
const selector = ['javascriptreact', 'javascript']
export function activate(Context) {
new CodeFormatterProvider()

View File

@ -1,28 +1,28 @@
{
"scopeName": "es6.inline.css",
"fileTypes": ["js", "jsx", "ts", "tsx"],
"injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string",
"fileTypes": ["js"],
"injectionSelector": "L:source.js -comment -string",
"patterns": [
{
"contentName": "meta.embedded.block.css",
"begin": "(?x)(\\s*?(\\w+\\.)?(?:css)\\s*)(`)",
"begin": "(?i)(\\s*css)(`)",
"beginCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.begin.ts"
"name": "string.template.js, punctuation.definition.string.template.begin.js"
},
"1": {
"name": "entity.name.function.tagged-template.ts"
"name": "entity.name.function.tagged-template.js"
}
},
"end": "(`)",
"endCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.end.ts"
"name": "string.template.js, punctuation.definition.string.template.end.js"
}
},
"patterns": [
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
},
{
"include": "source.css.scss"
@ -30,7 +30,7 @@
]
},
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
}
]
}

View File

@ -1,7 +1,7 @@
{
"scopeName": "es6.inline.html",
"fileTypes": ["js", "jsx", "ts", "tsx"],
"injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string",
"fileTypes": ["js"],
"injectionSelector": "L:source.js -comment -string",
"injections": {
"L:source": {
"patterns": [
@ -15,24 +15,24 @@
"patterns": [
{
"contentName": "meta.embedded.block.html",
"begin": "(?x)(\\s*?(\\w+\\.)?(?:html)\\s*)(`)",
"begin": "(?i)(\\s*html)(`)",
"beginCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.begin.ts"
"name": "string.template.js, punctuation.definition.string.template.begin.js"
},
"1": {
"name": "entity.name.function.tagged-template.ts"
"name": "entity.name.function.tagged-template.js"
}
},
"end": "(`)",
"endCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.end.ts"
"name": "string.template.js, punctuation.definition.string.template.end.js"
}
},
"patterns": [
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
},
{
"include": "text.html.basic"
@ -40,7 +40,7 @@
]
},
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
}
]
}

View File

@ -1,28 +1,28 @@
{
"scopeName": "es6.inline.scss",
"fileTypes": ["js", "jsx", "ts", "tsx"],
"injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string",
"fileTypes": ["js"],
"injectionSelector": "L:source.js -comment -string",
"patterns": [
{
"contentName": "meta.embedded.block.css",
"begin": "(?x)(\\s*?(\\w+\\.)?(?:scss)\\s*)(`)",
"begin": "(?i)(\\s*scss)(`)",
"beginCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.begin.ts"
"name": "string.template.js, punctuation.definition.string.template.begin.js"
},
"1": {
"name": "entity.name.function.tagged-template.ts"
"name": "entity.name.function.tagged-template.js"
}
},
"end": "(`)",
"endCaptures": {
"0": {
"name": "string.template.ts, punctuation.definition.string.template.end.ts"
"name": "string.template.js, punctuation.definition.string.template.end.js"
}
},
"patterns": [
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
},
{
"include": "source.css.scss"
@ -30,161 +30,7 @@
]
},
{
"include": "source.ts#template-substitution-element"
"include": "source.js#template-substitution-element"
}
],
"repository": {
"reserved-words": {
"name": "support.type.property-name.css.postcss",
"match": "\\b(false|from|in|not|null|through|to|true)\\b"
},
"double-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "\"",
"name": "string.quoted.double.css.postcss",
"end": "\""
},
"operator": {
"name": "keyword.operator.postcss",
"match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~"
},
"function-content": {
"name": "string.quoted.double.css.postcss",
"match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))"
},
"double-slash": {
"patterns": [
{
"include": "#comment-tag"
}
],
"begin": "//",
"name": "comment.line.postcss",
"end": "$"
},
"numeric": {
"name": "constant.numeric.css.postcss",
"match": "(-|\\.)?[0-9]+(\\.[0-9]+)?"
},
"variable-root-css": {
"name": "variable.parameter.postcss",
"match": "(?<!&)--[\\w-]+"
},
"function": {
"name": "support.function.name.postcss",
"match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()"
},
"rgb-value": {
"name": "constant.other.color.rgb-value.css.postcss",
"match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b"
},
"comment-tag": {
"patterns": [
{
"name": "comment.tag.postcss",
"match": "[\\w-]+"
}
],
"begin": "{{",
"name": "comment.tags.postcss",
"end": "}}"
},
"interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
}
],
"begin": "#{",
"name": "support.function.interpolation.postcss",
"end": "}"
},
"unit": {
"name": "keyword.other.unit.css.postcss",
"match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)"
},
"function-content-var": {
"name": "variable.parameter.postcss",
"match": "(?<=var\\()[\\w-]+(?=\\))"
},
"dotdotdot": {
"name": "variable.other",
"match": "\\.{3}"
},
"variable": {
"name": "variable.parameter.postcss",
"match": "\\$[\\w-]+"
},
"single-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "'",
"name": "string.quoted.single.css.postcss",
"end": "'"
},
"quoted-interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
}
],
"begin": "#{",
"name": "support.function.interpolation.postcss",
"end": "}"
},
"pseudo-class": {
"name": "entity.other.attribute-name.pseudo-class.css.postcss",
"match": ":[a-z:-]+"
},
"property-value": {
"name": "meta.property-value.css.postcss, support.constant.property-value.css.postcss",
"match": "[\\w-]+"
},
"placeholder-selector": {
"begin": "(?<!\\d)%(?!\\d)",
"name": "entity.other.attribute-name.placeholder-selector.postcss",
"end": "$\\n?|\\s|(?=;|{)"
},
"flag": {
"name": "keyword.other.important.css.postcss",
"match": "!(important|default|optional|global)"
},
"parent-selector": {
"name": "entity.name.tag.css.postcss",
"match": "&"
}
},
"foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.",
"foldingStopMarker": "\\*/|^\\s*$"
]
}

View File

@ -24,6 +24,8 @@ function bug() {
css`
.foo {
display: block;
.bar {
color: #f30;
}