好友
阅读权限10
听众
最后登录1970-1-1
|
vscode新语言插件
自带的语法高亮属性名称及效果
项目->syntaxes文件夹->nasm.tmLanguage.json(在这个文件夹里开始只有一个文件)
在控制语法高亮的代码里,有5个大模块,其中“$schema”(链接里是语言插件的说明)、"name"、"scopeName"在项目自动创建的时候就设置好了,没什么特别的
值得注意的只有"patterns"和"repository"
"patterns":>很像一个头文件,"repository"里有几个分类,就要写几个{"include": "#名称"}
"repository":>就是控制语法显示哪一种颜色的地方了,我这里写了3个,"keywords"和"numeric"的结构基本一样,"name": "填上面的属性名称","match": "这里是用正则表达式来匹配文本的"
"strings"要填内容的多些,"patterns"是设置字符串里面的内容显示效果的,"begin"和"end"确定在什么情况下以字符串的颜色显示
[JavaScript] 纯文本查看 复制代码 {
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "nasm",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
},
{
"include": "#numeric"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "comment",
"match": "\\bABC_abc_123_000\\b"
}
]
},
"strings": {
"name": "string.quoted.double",
"begin": "\"|'",
"end": "\"|'",
"patterns": [
{
"name": "constant.character.escape",
"match": "\\\\."
}
]
},
"numeric": {
"patterns": [
{
"name": "constant.numeric",
"match": "\\b0x[0-9a-fA-F]+\\b"
}
]
}
},
"scopeName": "source.asm"
}
最后附上所有名称
[C] 纯文本查看 复制代码 "comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"comment.line.double-dash",
"comment.line.double-slash",
"comment.line.number-sign",
"comment.line.percentage",
"constant",
"constant.character",
"constant.character.escape",
"constant.language",
"constant.numeric",
"constant.other",
"constant.regexp",
"constant.rgb-value",
"constant.sha.git-rebase",
"emphasis",
"entity",
"entity.name",
"entity.name.class",
"entity.name.function",
"entity.name.method",
"entity.name.section",
"entity.name.selector",
"entity.name.tag",
"entity.name.type",
"entity.other",
"entity.other.attribute-name",
"entity.other.inherited-class",
"header",
"invalid",
"invalid.deprecated",
"invalid.illegal",
"keyword",
"keyword.control",
"keyword.control.less",
"keyword.operator",
"keyword.operator.new",
"keyword.other",
"keyword.other.unit",
"markup",
"markup.bold",
"markup.changed",
"markup.deleted",
"markup.heading",
"markup.inline.raw",
"markup.inserted",
"markup.italic",
"markup.list",
"markup.list.numbered",
"markup.list.unnumbered",
"markup.other",
"markup.punctuation.list.beginning",
"markup.punctuation.quote.beginning",
"markup.quote",
"markup.raw",
"markup.underline",
"markup.underline.link",
"meta",
"meta.cast",
"meta.parameter.type.variable",
"meta.preprocessor",
"meta.preprocessor.numeric",
"meta.preprocessor.string",
"meta.return-type",
"meta.selector",
"meta.structure.dictionary.key.python",
"meta.tag",
"meta.type.annotation",
"meta.type.name",
"metatag.php",
"storage",
"storage.modifier",
"storage.modifier.import.java",
"storage.modifier.package.java",
"storage.type",
"storage.type.cs",
"storage.type.java",
"string",
"string.html",
"string.interpolated",
"string.jade",
"string.other",
"string.quoted",
"string.quoted.double",
"string.quoted.other",
"string.quoted.single",
"string.quoted.triple",
"string.regexp",
"string.unquoted",
"string.xml",
"string.yaml",
"strong",
"support",
"support.class",
"support.constant",
"support.function",
"support.function.git-rebase",
"support.other",
"support.property-value",
"support.type",
"support.type.property-name",
"support.type.property-name.css",
"support.type.property-name.less",
"support.type.property-name.scss",
"support.variable",
"variable",
"variable.language",
"variable.name",
"variable.other",
"variable.parameter" |
免费评分
-
查看全部评分
|