feat(core): mix模式下使用diff去修改代码防止触发整个文件代码高亮的重新构建
This commit is contained in:
123
common/templates/json/tree-sitter/grammars/c.json
Normal file
123
common/templates/json/tree-sitter/grammars/c.json
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"type_identifier": "type",
|
||||
"primitive_type": "type",
|
||||
"\"signed\"": "type",
|
||||
"\"unsigned\"": "type",
|
||||
"\"short\"": "type",
|
||||
"\"long\"": "type",
|
||||
|
||||
"statement_identifier": "variable",
|
||||
|
||||
"\"const\"": "modifier",
|
||||
"\"static\"": "modifier",
|
||||
"\"auto\"": "modifier",
|
||||
"\"extern\"": "modifier",
|
||||
"\"inline\"": "modifier",
|
||||
"\"register\"": "modifier",
|
||||
"\"volatile\"": "modifier",
|
||||
"\"restrict\"": "modifier",
|
||||
"\"_Atomic\"": "modifier",
|
||||
"\"__attribute__\"": "modifier",
|
||||
"function_specifier": "modifier",
|
||||
|
||||
"number_literal": "number",
|
||||
"char_literal": "string",
|
||||
"string_literal": "string",
|
||||
"system_lib_string": "string",
|
||||
"escape_sequence": "string",
|
||||
"comment": "comment",
|
||||
|
||||
"null": "constant",
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"default\"": "control",
|
||||
"\"goto\"": "control",
|
||||
"\"struct\"": "control",
|
||||
"\"enum\"": "control",
|
||||
"\"union\"": "control",
|
||||
"\"typedef\"": "control",
|
||||
|
||||
"\"sizeof\"": "operator",
|
||||
"\".\"": "operator",
|
||||
"\"->\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\":\"": "operator",
|
||||
|
||||
"\"#if\"": "directive",
|
||||
"\"#ifdef\"": "directive",
|
||||
"\"#ifndef\"": "directive",
|
||||
"\"#elif\"": "directive",
|
||||
"\"#else\"": "directive",
|
||||
"\"#endif\"": "directive",
|
||||
"\"#define\"": "directive",
|
||||
"\"#include\"": "directive",
|
||||
"preproc_directive": "directive",
|
||||
"preproc_arg": "directive",
|
||||
|
||||
"\";\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "field_identifier"],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"field_identifier": "variable",
|
||||
|
||||
"call_expression > identifier" : "function",
|
||||
"call_expression > field_expression > field_identifier" : "function",
|
||||
"function_declarator > identifier" : "function"
|
||||
}
|
||||
|
||||
}
|
||||
156
common/templates/json/tree-sitter/grammars/cpp.json
Normal file
156
common/templates/json/tree-sitter/grammars/cpp.json
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"type_identifier": "type",
|
||||
"primitive_type": "type",
|
||||
"\"unsigned\"": "type",
|
||||
"\"signed\"": "type",
|
||||
"\"short\"": "type",
|
||||
"\"long\"": "type",
|
||||
"auto": "type",
|
||||
|
||||
"namespace_identifier": "scope",
|
||||
|
||||
"operator_name": "function",
|
||||
|
||||
"\"public\"": "modifier",
|
||||
"\"protected\"": "modifier",
|
||||
"\"private\"": "modifier",
|
||||
"\"virtual\"": "modifier",
|
||||
"\"override\"": "modifier",
|
||||
"\"default\"": "modifier",
|
||||
"\"final\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
"\"constexpr\"": "modifier",
|
||||
"\"static\"": "modifier",
|
||||
"\"extern\"": "modifier",
|
||||
"\"inline\"": "modifier",
|
||||
"\"noexcept\"": "modifier",
|
||||
"\"explicit\"": "modifier",
|
||||
"\"friend\"": "modifier",
|
||||
"\"register\"": "modifier",
|
||||
"\"volatile\"": "modifier",
|
||||
"\"restrict\"": "modifier",
|
||||
"\"_Atomic\"": "modifier",
|
||||
"\"__attribute__\"": "modifier",
|
||||
"function_specifier": "modifier",
|
||||
|
||||
"number_literal": "number",
|
||||
"char_literal": "string",
|
||||
"string_literal": "string",
|
||||
"system_lib_string": "string",
|
||||
"raw_string_literal": "string",
|
||||
"escape_sequence": "string",
|
||||
"comment": "comment",
|
||||
|
||||
"null": "constant",
|
||||
"nullptr": "constant",
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"goto\"": "control",
|
||||
|
||||
"\"struct\"": "control",
|
||||
"\"enum\"": "control",
|
||||
"\"union\"": "control",
|
||||
"\"typedef\"": "control",
|
||||
"\"class\"": "control",
|
||||
"\"using\"": "control",
|
||||
"\"namespace\"": "control",
|
||||
"\"template\"": "control",
|
||||
"\"typename\"": "control",
|
||||
"\"try\"": "control",
|
||||
"\"catch\"": "control",
|
||||
"\"throw\"": "control",
|
||||
|
||||
"\"sizeof\"": "operator",
|
||||
"\"new\"": "operator",
|
||||
"\".\"": "operator",
|
||||
"\"->\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\"::\"": "operator",
|
||||
|
||||
"\"#if\"": "directive",
|
||||
"\"#ifdef\"": "directive",
|
||||
"\"#ifndef\"": "directive",
|
||||
"\"#elif\"": "directive",
|
||||
"\"#else\"": "directive",
|
||||
"\"#endif\"": "directive",
|
||||
"\"#define\"": "directive",
|
||||
"\"#include\"": "directive",
|
||||
"preproc_directive": "directive",
|
||||
|
||||
"\";\"": "punctuation",
|
||||
"\":\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "field_identifier", "\"delete\""],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"field_identifier": "variable",
|
||||
|
||||
"call_expression > identifier": "function",
|
||||
"call_expression > field_expression > field_identifier": "function",
|
||||
"call_expression > scoped_identifier > identifier": "function",
|
||||
"template_function > identifier": "function",
|
||||
"template_function > scoped_identifier > identifier": "function",
|
||||
"template_method > field_identifier": "function",
|
||||
"function_declarator > identifier": "function",
|
||||
"function_declarator > field_identifier": "function",
|
||||
"function_declarator > scoped_identifier > identifier": "function",
|
||||
"destructor_name > identifier": "function",
|
||||
|
||||
"\"delete\"": "operator",
|
||||
"delete_method_clause > \"delete\"": "modifier"
|
||||
}
|
||||
}
|
||||
108
common/templates/json/tree-sitter/grammars/go.json
Normal file
108
common/templates/json/tree-sitter/grammars/go.json
Normal file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"type_identifier": "type",
|
||||
"package_identifier": "scope",
|
||||
|
||||
"\"var\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
|
||||
"interpreted_string_literal": "string",
|
||||
"raw_string_literal": "string",
|
||||
"escape_sequence": "string",
|
||||
"rune_literal": "number",
|
||||
"int_literal": "number",
|
||||
"float_literal": "number",
|
||||
"imaginary_literal": "number",
|
||||
"comment": "comment",
|
||||
|
||||
"nil": "constant",
|
||||
"false": "constant",
|
||||
"true": "constant",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"select\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"default\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"goto\"": "control",
|
||||
"\"fallthrough\"": "control",
|
||||
"\"defer\"": "control",
|
||||
"\"range\"": "control",
|
||||
"\"go\"": "control",
|
||||
|
||||
"\"type\"": "operator",
|
||||
"\"struct\"": "operator",
|
||||
"\"import\"": "operator",
|
||||
"\"package\"": "operator",
|
||||
"\"func\"": "operator",
|
||||
"\"interface\"": "operator",
|
||||
"\"map\"": "operator",
|
||||
"\"chan\"": "operator",
|
||||
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\":=\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"&^\"": "operator",
|
||||
"\"&^=\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"...\"": "operator",
|
||||
"\"<-\"": "operator",
|
||||
"\"[\"": "operator",
|
||||
"\"]\"": "operator",
|
||||
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\";\"": "punctuation",
|
||||
"\".\"": "punctuation",
|
||||
"\":\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "field_identifier"],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"field_identifier": "variable",
|
||||
|
||||
"call_expression > identifier": "function",
|
||||
"function_declaration > identifier": "function",
|
||||
"method_declaration > field_identifier": "function",
|
||||
"call_expression > selector_expression > field_identifier": "function"
|
||||
}
|
||||
}
|
||||
136
common/templates/json/tree-sitter/grammars/javascript.json
Normal file
136
common/templates/json/tree-sitter/grammars/javascript.json
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"shorthand_property_identifier": "variable",
|
||||
|
||||
"\"var\"": "modifier",
|
||||
"\"let\"": "modifier",
|
||||
"\"extends\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
"\"static\"": "modifier",
|
||||
|
||||
"number": "number",
|
||||
"string": "string",
|
||||
"escape_sequence": "string",
|
||||
"template_string": "string",
|
||||
"regex": "string",
|
||||
"comment": "comment",
|
||||
"hash_bang_line": "comment",
|
||||
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
"null": "constant",
|
||||
"undefined": "constant",
|
||||
|
||||
"\"as\"": "control",
|
||||
"\"if\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"throw\"": "control",
|
||||
"\"try\"": "control",
|
||||
"\"catch\"": "control",
|
||||
"\"finally\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"default\"": "control",
|
||||
"\"export\"": "control",
|
||||
"\"import\"": "control",
|
||||
"\"from\"": "control",
|
||||
"\"yield\"": "control",
|
||||
"\"async\"": "control",
|
||||
"\"await\"": "control",
|
||||
"\"debugger\"": "control",
|
||||
"\"delete\"": "control",
|
||||
|
||||
"this": "operator",
|
||||
"\"class\"": "operator",
|
||||
"\"function\"": "operator",
|
||||
|
||||
"\"in\"": "operator",
|
||||
"\"instanceof\"": "operator",
|
||||
"\"of\"": "operator",
|
||||
"\"new\"": "operator",
|
||||
"\"typeof\"": "operator",
|
||||
"\"get\"": "operator",
|
||||
"\"set\"": "operator",
|
||||
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\">>>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"===\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"!==\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"=>\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\":\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\">>>\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"...\"": "operator",
|
||||
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\";\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\".\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\"${\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "field_identifier", "property_identifier", "super"],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"property_identifier": "variable",
|
||||
"formal_parameters > identifier": "variable",
|
||||
"jsx_attribute > property_identifier": "variable",
|
||||
|
||||
"class > identifier": "type",
|
||||
"new_expression > identifier": "type",
|
||||
"jsx_opening_element > identifier": "type",
|
||||
"jsx_closing_element > identifier": "type",
|
||||
"jsx_self_closing_element > identifier": "type",
|
||||
|
||||
"call_expression > identifier": "function",
|
||||
"call_expression > super": "function",
|
||||
"function > identifier": "function",
|
||||
"generator_function > identifier": "function",
|
||||
"method_definition > property_identifier": "function",
|
||||
"call_expression > member_expression > property_identifier": "function"
|
||||
}
|
||||
}
|
||||
87
common/templates/json/tree-sitter/grammars/lua.json
Normal file
87
common/templates/json/tree-sitter/grammars/lua.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
|
||||
"method": "function",
|
||||
|
||||
"\"local\"": "modifier",
|
||||
"\"function\"": "modifier",
|
||||
|
||||
"number": "number",
|
||||
"string": "string",
|
||||
"comment": "comment",
|
||||
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
"nil": "constant",
|
||||
"global_variable": "constant",
|
||||
|
||||
"\"while\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"until\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"if\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"elseif\"": "control",
|
||||
"\"then\"": "control",
|
||||
"\"end\"": "control",
|
||||
"\"goto\"": "control",
|
||||
"\"repeat\"": "control",
|
||||
"\"return\"": "control",
|
||||
|
||||
"self": "operator",
|
||||
"\"and\"": "operator",
|
||||
"\"or\"": "operator",
|
||||
"\"not\"": "operator",
|
||||
"\"in\"": "operator",
|
||||
"\"next\"": "operator",
|
||||
"\"spread\"": "operator",
|
||||
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"#\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"//\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"~=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"::\"": "operator",
|
||||
"\":\"": "operator",
|
||||
"\".\"": "operator",
|
||||
"\"..\"": "operator",
|
||||
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\";\"": "punctuation",
|
||||
"\",\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "property_identifier"],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"property_identifier": "variable",
|
||||
|
||||
"function_call > identifier": "function",
|
||||
"function_call > property_identifier": "function",
|
||||
"function_name > identifier": "function",
|
||||
"function_name > property_identifier": "function",
|
||||
"local_function > identifier": "function"
|
||||
}
|
||||
}
|
||||
164
common/templates/json/tree-sitter/grammars/php.json
Normal file
164
common/templates/json/tree-sitter/grammars/php.json
Normal file
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
|
||||
"variable_name": "variable",
|
||||
|
||||
"__construct": "function",
|
||||
"\"echo\"": "function",
|
||||
"\"print\"": "function",
|
||||
"\"unset\"": "function",
|
||||
"\"isset\"": "function",
|
||||
"\"eval\"": "function",
|
||||
"\"array\"": "function",
|
||||
"\"list\"": "function",
|
||||
"\"empty\"": "function",
|
||||
|
||||
"require_once": "function",
|
||||
"require": "function",
|
||||
"include_once": "function",
|
||||
"include": "function",
|
||||
|
||||
"\"callable\"": "modifier",
|
||||
"\"var\"": "modifier",
|
||||
"\"trait\"": "modifier",
|
||||
"\"class\"": "modifier",
|
||||
"\"interface\"": "modifier",
|
||||
"\"function\"": "modifier",
|
||||
"\"type\"": "modifier",
|
||||
|
||||
"\"static\"": "modifier",
|
||||
"\"public\"": "modifier",
|
||||
"\"private\"": "modifier",
|
||||
"\"protected\"": "modifier",
|
||||
"\"global\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
"\"abstract\"": "modifier",
|
||||
"\"extends\"": "modifier",
|
||||
"\"implements\"": "modifier",
|
||||
"\"final\"": "modifier",
|
||||
|
||||
"integer": "number",
|
||||
"float": "number",
|
||||
"string": "string",
|
||||
"regex": "string",
|
||||
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
|
||||
"comment": "comment",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"elseif\"": "control",
|
||||
"\"endif\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"endwhile\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"endfor\"": "control",
|
||||
"\"foreach\"": "control",
|
||||
"\"endforeach\"": "control",
|
||||
"\"declare\"": "control",
|
||||
"\"enddeclare\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"throw\"": "control",
|
||||
"\"try\"": "control",
|
||||
"\"catch\"": "control",
|
||||
"\"finally\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"endswitch\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"default\"": "control",
|
||||
"\"yield\"": "control",
|
||||
"\"goto\"": "control",
|
||||
"\"exit\"": "control",
|
||||
"\"die\"": "control",
|
||||
|
||||
"\"new\"": "operator",
|
||||
"\"clone\"": "operator",
|
||||
"\"insteadof\"": "operator",
|
||||
"\"instanceof\"": "operator",
|
||||
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"**\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"===\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"!==\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"<>\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"=>\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=>\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"$\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"and\"": "operator",
|
||||
"\"or\"": "operator",
|
||||
"\"xor\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\".\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\":\"": "operator",
|
||||
"\"??\"": "operator",
|
||||
"\"->\"": "operator",
|
||||
"\"as\"": "operator",
|
||||
|
||||
"\"use\"": "directive",
|
||||
"\"namespace\"": "directive",
|
||||
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\";\"": "punctuation",
|
||||
"\",\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["name", "simple_variable"],
|
||||
|
||||
"complexScopes": {
|
||||
"class_declaration > name": "type",
|
||||
"catch_clause > qualified_name > name": "type",
|
||||
"class_base_clause > qualified_name > name": "type",
|
||||
"interface_declaration > name": "type",
|
||||
"class_interface_clause > qualified_name > name": "type",
|
||||
"object_creation_expression > qualified_name > name": "type",
|
||||
"cast_expression > cast_type": "type",
|
||||
"object_creation_expression > new_variable > simple_variable": "type",
|
||||
|
||||
"name": "variable",
|
||||
"member_access_expression > name": "variable",
|
||||
|
||||
"function_definition > name": "function",
|
||||
"function_call_expression > name": "function",
|
||||
"function_call_expression > qualified_name": "function",
|
||||
"method_declaration > name": "function",
|
||||
"method_declaration > function_definition > name": "function",
|
||||
"scoped_call_expression > name": "function",
|
||||
"member_call_expression > name": "function",
|
||||
|
||||
"const_element > name": "constant",
|
||||
"class_constant_access_expression > name": "constant",
|
||||
"qualified_name > name": "constant"
|
||||
}
|
||||
}
|
||||
117
common/templates/json/tree-sitter/grammars/python.json
Normal file
117
common/templates/json/tree-sitter/grammars/python.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"module": "scope",
|
||||
|
||||
"\"global\"": "modifier",
|
||||
"\"nonlocal\"": "modifier",
|
||||
|
||||
"decorator": "function",
|
||||
"\"print\"": "function",
|
||||
"\"assert\"": "function",
|
||||
"\"exec\"": "function",
|
||||
"\"del\"": "function",
|
||||
|
||||
"integer" : "number",
|
||||
"float" : "number",
|
||||
"string": "string",
|
||||
"escape_sequence": "string",
|
||||
"interpolation": "string",
|
||||
"comment": "comment",
|
||||
|
||||
"none": "constant",
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"elif\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"pass\"": "control",
|
||||
"\"raise\"": "control",
|
||||
"\"yield\"": "control",
|
||||
"\"await\"": "control",
|
||||
"\"async\"": "control",
|
||||
"\"try\"": "control",
|
||||
"\"except\"": "control",
|
||||
"\"with\"": "control",
|
||||
"\"as\"": "control",
|
||||
"\"finally\"": "control",
|
||||
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"@\"": "operator",
|
||||
"\"**\"": "operator",
|
||||
"\"//\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"<>\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"@=\"": "operator",
|
||||
"\"**=\"": "operator",
|
||||
"\"//=\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
|
||||
"\"in\"": "operator",
|
||||
"\"and\"": "operator",
|
||||
"\"or\"": "operator",
|
||||
"\"not\"": "operator",
|
||||
"\"is\"": "operator",
|
||||
|
||||
"\"import\"": "directive",
|
||||
"\"from\"": "directive",
|
||||
"\"class\"": "directive",
|
||||
"\"def\"": "directive",
|
||||
"\"lambda\"": "directive",
|
||||
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "attribute"],
|
||||
|
||||
"complexScopes": {
|
||||
"type > identifier": "type",
|
||||
"class_definition > identifier": "type",
|
||||
"class_definition > argument_list > attribute": "type",
|
||||
"class_definition > argument_list > identifier": "type",
|
||||
"class_definition > argument_list > keyword_argument > attribute": "type",
|
||||
"class_definition > argument_list > keyword_argument > identifier": "type",
|
||||
|
||||
"identifier": "variable",
|
||||
"attribute > identifier": "variable",
|
||||
"keyword_argument > identifier": "variable",
|
||||
"default_parameter > identifier": "variable",
|
||||
"parameters > identifier": "variable",
|
||||
"parameters > list_splat > identifier": "variable",
|
||||
"parameters > dictionary_splat > identifier": "variable",
|
||||
|
||||
"call > identifier": "function",
|
||||
"call > attribute > identifier[-1]": "function",
|
||||
"function_definition > identifier": "function"
|
||||
}
|
||||
}
|
||||
117
common/templates/json/tree-sitter/grammars/ruby.json
Normal file
117
common/templates/json/tree-sitter/grammars/ruby.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"constant": "type",
|
||||
|
||||
"class_variable": "variable",
|
||||
"instance_variable": "variable",
|
||||
|
||||
"string": "string",
|
||||
"bare_string": "string",
|
||||
"subshell": "string",
|
||||
"heredoc_beginning": "string",
|
||||
"heredoc_body": "string",
|
||||
"regex": "string",
|
||||
"escape_sequence": "string",
|
||||
"symbol": "string",
|
||||
"bare_symbol": "string",
|
||||
"interpolation": "string",
|
||||
"float": "number",
|
||||
"integer": "number",
|
||||
"complex": "number",
|
||||
"rational": "number",
|
||||
"comment": "comment",
|
||||
|
||||
"nil": "constant",
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
|
||||
"\"if\"": "control",
|
||||
"\"unless\"": "control",
|
||||
"\"def\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"end\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"elsif\"": "control",
|
||||
"\"class\"": "control",
|
||||
"\"module\"": "control",
|
||||
"\"alias\"": "control",
|
||||
"\"begin\"": "control",
|
||||
"\"rescue\"": "control",
|
||||
"\"ensure\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"yield\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"when\"": "control",
|
||||
"\"then\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"next\"": "control",
|
||||
"\"retry\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"in\"": "control",
|
||||
"\"until\"": "control",
|
||||
|
||||
"self": "control",
|
||||
"super": "control",
|
||||
|
||||
"\"and\"": "operator",
|
||||
"\"or\"": "operator",
|
||||
"\"not\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"===\"": "operator",
|
||||
"\"<=>\"": "operator",
|
||||
"\"=~\"": "operator",
|
||||
"\"!~\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"**\"": "operator",
|
||||
"\"+@\"": "operator",
|
||||
"\"-@\"": "operator",
|
||||
"\"..\"": "operator",
|
||||
"\"[]\"": "operator",
|
||||
"\"[]=\"": "operator",
|
||||
"\"defined?\"": "operator",
|
||||
|
||||
"\",\"": "punctuation",
|
||||
"\"%w(\"": "punctuation",
|
||||
"\"%i(\"": "punctuation",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\"#{\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier"],
|
||||
|
||||
"complexScopes": {
|
||||
"identifier": "variable",
|
||||
"block_parameters > identifier": "variable",
|
||||
"keyword_parameter > identifier": "constant",
|
||||
|
||||
"method > identifier": "function",
|
||||
"setter > identifier": "function",
|
||||
"call > identifier": "function",
|
||||
"method_call > identifier": "function",
|
||||
"singleton_method > identifier": "function",
|
||||
"method_parameters > identifier": "function"
|
||||
},
|
||||
}
|
||||
168
common/templates/json/tree-sitter/grammars/rust.json
Normal file
168
common/templates/json/tree-sitter/grammars/rust.json
Normal file
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
|
||||
"primitive_type": "type",
|
||||
|
||||
"inner_attribute_item": "variable",
|
||||
"shorthand_field_identifier": "variable",
|
||||
"\"_\"": "variable",
|
||||
|
||||
"boolean_literal": "number",
|
||||
"integer_literal": "number",
|
||||
"float_literal": "number",
|
||||
"char_literal": "string",
|
||||
"string_literal": "string",
|
||||
"raw_string_literal": "string",
|
||||
"escape_sequence": "string",
|
||||
"line_comment": "comment",
|
||||
"block_comment": "comment",
|
||||
|
||||
"\"let\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
"\"static\"": "modifier",
|
||||
"\"extern\"": "modifier",
|
||||
"\"dyn\"": "modifier",
|
||||
"\"trait\"": "modifier",
|
||||
"\"mod\"": "modifier",
|
||||
"\"pub\"": "modifier",
|
||||
"\"default\"": "modifier",
|
||||
"\"ref\"": "modifier",
|
||||
"mutable_specifier": "modifier",
|
||||
|
||||
"\"fn\"": "control",
|
||||
"\"type\"": "control",
|
||||
"\"struct\"": "control",
|
||||
"\"enum\"": "control",
|
||||
"\"union\"": "control",
|
||||
"\"impl\"": "control",
|
||||
|
||||
"\"unsafe\"": "control",
|
||||
"\"match\"": "control",
|
||||
"\"if\"": "control",
|
||||
"\"in\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"move\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"loop\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"where\"": "control",
|
||||
"\"macro_rules!\"": "control",
|
||||
|
||||
"self": "control",
|
||||
"super": "control",
|
||||
"crate": "control",
|
||||
|
||||
"\".\"": "operator",
|
||||
"\"->\"": "operator",
|
||||
"\"=>\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\"::\"": "operator",
|
||||
"\"..\"": "operator",
|
||||
"\"as\"": "operator",
|
||||
|
||||
"\"use\"": "directive",
|
||||
"\"#\"": "directive",
|
||||
|
||||
"\";\"": "punctuation",
|
||||
"\":\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": [
|
||||
"identifier", "field_identifier", "type_identifier",
|
||||
"\"(\"", "\")\"", "\"[\"", "\"]\"", "\"*\""],
|
||||
|
||||
"complexScopes": {
|
||||
"type_identifier": "type",
|
||||
"scoped_type_identifier > type_identifier": "type",
|
||||
"use_declaration > identifier": "type",
|
||||
"use_declaration > scoped_identifier > identifier[-1]": "type",
|
||||
"use_list > identifier": "type",
|
||||
"use_list > scoped_identifier > identifier": "type",
|
||||
"use_wildcard > \"*\"": "type",
|
||||
"use_as_clause > identifier": "type",
|
||||
"tuple_struct_pattern > identifier": "type",
|
||||
"tuple_struct_pattern > scoped_identifier > identifier[-1]": "type",
|
||||
"enum_variant > identifier": "type",
|
||||
"match_pattern > scoped_identifier > identifier[-1]": "type",
|
||||
"unit_type > \"(\"": "type",
|
||||
"unit_type > \")\"": "type",
|
||||
|
||||
"scoped_identifier > identifier": "scope",
|
||||
"scoped_type_identifier > identifier": "scope",
|
||||
"scoped_type_identifier > scoped_identifier > identifier": "scope",
|
||||
"scoped_identifier > scoped_identifier > identifier": "scope",
|
||||
"scoped_use_list > scoped_identifier > identifier": "scope",
|
||||
"scoped_use_list > identifier": "scope",
|
||||
"use_wildcard > scoped_identifier > identifier": "scope",
|
||||
"use_wildcard > identifier": "scope",
|
||||
"struct_pattern > scoped_type_identifier > identifier": "scope",
|
||||
"struct_expression > scoped_type_identifier > identifier": "scope",
|
||||
|
||||
"identifier": "variable",
|
||||
"field_identifier": "variable",
|
||||
"scoped_identifier > identifier[-1]": "variable",
|
||||
|
||||
"call_expression > identifier": "function",
|
||||
"call_expression > field_expression > field_identifier[-1]": "function",
|
||||
"call_expression > scoped_identifier > identifier[-1]": "function",
|
||||
"macro_invocation > identifier": "function",
|
||||
"macro_definition > identifier": "function",
|
||||
"generic_function > identifier": "function",
|
||||
"generic_function > field_expression > field_identifier": "function",
|
||||
"generic_function > scoped_identifier > identifier": "function",
|
||||
"function_item > identifier": "function",
|
||||
"function_signature_item > identifier": "function",
|
||||
|
||||
"lifetime > identifier": "modifier",
|
||||
|
||||
"meta_item > identifier": "directive",
|
||||
|
||||
"\"*\"": "operator",
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"unit_expression > \"(\"": "constant",
|
||||
"unit_expression > \")\"": "constant",
|
||||
"attribute_item > \"[\"": "directive",
|
||||
"attribute_item > \"]\"": "directive"
|
||||
}
|
||||
}
|
||||
156
common/templates/json/tree-sitter/grammars/typescript.json
Normal file
156
common/templates/json/tree-sitter/grammars/typescript.json
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"simpleTerms": {
|
||||
"type_identifier": "type",
|
||||
"predefined_type": "type",
|
||||
|
||||
"namespace": "scope",
|
||||
"\"module\"": "scope",
|
||||
|
||||
"shorthand_property_identifier": "variable",
|
||||
|
||||
"\"var\"": "modifier",
|
||||
"\"let\"": "modifier",
|
||||
"\"extends\"": "modifier",
|
||||
"\"const\"": "modifier",
|
||||
"\"static\"": "modifier",
|
||||
"\"public\"": "modifier",
|
||||
"\"private\"": "modifier",
|
||||
"\"protected\"": "modifier",
|
||||
"\"readonly\"": "modifier",
|
||||
|
||||
"number": "number",
|
||||
"string": "string",
|
||||
"escape_sequence": "string",
|
||||
"template_string": "string",
|
||||
"template_substitution": "string",
|
||||
"regex": "string",
|
||||
"comment": "comment",
|
||||
"hash_bang_line": "comment",
|
||||
|
||||
"true": "constant",
|
||||
"false": "constant",
|
||||
"null": "constant",
|
||||
"undefined": "constant",
|
||||
|
||||
"\"as\"": "control",
|
||||
"\"if\"": "control",
|
||||
"\"do\"": "control",
|
||||
"\"else\"": "control",
|
||||
"\"while\"": "control",
|
||||
"\"for\"": "control",
|
||||
"\"return\"": "control",
|
||||
"\"break\"": "control",
|
||||
"\"continue\"": "control",
|
||||
"\"throw\"": "control",
|
||||
"\"try\"": "control",
|
||||
"\"catch\"": "control",
|
||||
"\"finally\"": "control",
|
||||
"\"switch\"": "control",
|
||||
"\"case\"": "control",
|
||||
"\"default\"": "control",
|
||||
"\"export\"": "control",
|
||||
"\"import\"": "control",
|
||||
"\"from\"": "control",
|
||||
"\"yield\"": "control",
|
||||
"\"async\"": "control",
|
||||
"\"await\"": "control",
|
||||
"\"debugger\"": "control",
|
||||
|
||||
"this": "operator",
|
||||
"\"class\"": "operator",
|
||||
"\"type\"": "operator",
|
||||
"\"enum\"": "operator",
|
||||
"\"function\"": "operator",
|
||||
"\"interface\"": "operator",
|
||||
"\"implements\"": "operator",
|
||||
"\"declare\"": "operator",
|
||||
|
||||
"\"in\"": "operator",
|
||||
"\"instanceof\"": "operator",
|
||||
"\"of\"": "operator",
|
||||
"\"new\"": "operator",
|
||||
"\"delete\"": "operator",
|
||||
"\"typeof\"": "operator",
|
||||
"\"get\"": "operator",
|
||||
"\"set\"": "operator",
|
||||
|
||||
"\"=\"": "operator",
|
||||
"\"+=\"": "operator",
|
||||
"\"-=\"": "operator",
|
||||
"\"*=\"": "operator",
|
||||
"\"/=\"": "operator",
|
||||
"\"%=\"": "operator",
|
||||
"\"<<=\"": "operator",
|
||||
"\">>=\"": "operator",
|
||||
"\">>>=\"": "operator",
|
||||
"\"&=\"": "operator",
|
||||
"\"^=\"": "operator",
|
||||
"\"|=\"": "operator",
|
||||
"\"!\"": "operator",
|
||||
"\"+\"": "operator",
|
||||
"\"-\"": "operator",
|
||||
"\"*\"": "operator",
|
||||
"\"/\"": "operator",
|
||||
"\"%\"": "operator",
|
||||
"\"==\"": "operator",
|
||||
"\"===\"": "operator",
|
||||
"\"!=\"": "operator",
|
||||
"\"!==\"": "operator",
|
||||
"\">=\"": "operator",
|
||||
"\"<=\"": "operator",
|
||||
"\"=>\"": "operator",
|
||||
"\">\"": "operator",
|
||||
"\"<\"": "operator",
|
||||
"\":\"": "operator",
|
||||
"\"?\"": "operator",
|
||||
"\"&&\"": "operator",
|
||||
"\"||\"": "operator",
|
||||
"\"&\"": "operator",
|
||||
"\"~\"": "operator",
|
||||
"\"^\"": "operator",
|
||||
"\">>\"": "operator",
|
||||
"\">>>\"": "operator",
|
||||
"\"<<\"": "operator",
|
||||
"\"|\"": "operator",
|
||||
"\"++\"": "operator",
|
||||
"\"--\"": "operator",
|
||||
"\"...\"": "operator",
|
||||
|
||||
"\"(\"": "punctuation",
|
||||
"\")\"": "punctuation",
|
||||
"\"{\"": "punctuation",
|
||||
"\"}\"": "punctuation",
|
||||
"\";\"": "punctuation",
|
||||
"\"[\"": "punctuation",
|
||||
"\"]\"": "punctuation",
|
||||
"\".\"": "punctuation",
|
||||
"\",\"": "punctuation",
|
||||
"\"${\"": "punctuation"
|
||||
},
|
||||
|
||||
"complexTerms": ["identifier", "property_identifier", "super"],
|
||||
|
||||
"complexScopes": {
|
||||
"class > identifier": "type",
|
||||
"new_expression > call_expression > identifier": "type",
|
||||
"jsx_opening_element > identifier": "type",
|
||||
"jsx_closing_element > identifier": "type",
|
||||
"jsx_self_closing_element > identifier": "type",
|
||||
|
||||
"nested_type_identifier > identifier": "scope",
|
||||
|
||||
"identifier": "variable",
|
||||
"property_identifier": "variable",
|
||||
"member_expression > property_identifier": "variable",
|
||||
"jsx_attribute > property_identifier": "variable",
|
||||
|
||||
"call_expression > identifier": "function",
|
||||
"call_expression > super": "function",
|
||||
"function > identifier": "function",
|
||||
"generator_function > identifier": "function",
|
||||
"method_definition > property_identifier": "function",
|
||||
"call_expression > member_expression > property_identifier": "function",
|
||||
"method_signature > property_identifier": "function",
|
||||
"function_signature > identifier": "function"
|
||||
}
|
||||
}
|
||||
124
common/templates/json/tree-sitter/themes/dark-cpp.json
Normal file
124
common/templates/json/tree-sitter/themes/dark-cpp.json
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"monacoTreeSitter": {
|
||||
"type": "#4EC9B0",
|
||||
"scope": "#D4D4D4",
|
||||
"function": "#E5C07B",
|
||||
"variable": "#9CDCFE",
|
||||
"number": "#B5CEA8",
|
||||
"string": "#D19A66",
|
||||
"comment": "#5C6370",
|
||||
"constant": "#56B6C2",
|
||||
"directive": "#C586C0",
|
||||
"control": "#569CD6",
|
||||
"operator": "#D4D4D4",
|
||||
"modifier": "#569CD6",
|
||||
"punctuation": "#D4D4D4"
|
||||
},
|
||||
"base": {
|
||||
"base": "vs-dark",
|
||||
"inherit": true,
|
||||
"rules": [
|
||||
{
|
||||
"token": "comment",
|
||||
"foreground": "5C6370",
|
||||
"fontStyle": "italic"
|
||||
},
|
||||
{
|
||||
"token": "keyword",
|
||||
"foreground": "569CD6",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control",
|
||||
"foreground": "569CD6",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "storage",
|
||||
"foreground": "569CD6",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "storage.type",
|
||||
"foreground": "569CD6",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.type",
|
||||
"foreground": "4EC9B0"
|
||||
},
|
||||
{
|
||||
"token": "support.type",
|
||||
"foreground": "4EC9B0"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.function",
|
||||
"foreground": "E5C07B",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "support.function",
|
||||
"foreground": "E5C07B",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "meta.function-call",
|
||||
"foreground": "E5C07B",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "variable",
|
||||
"foreground": "9CDCFE"
|
||||
},
|
||||
{
|
||||
"token": "variable.parameter",
|
||||
"foreground": "9CDCFE"
|
||||
},
|
||||
{
|
||||
"token": "constant.numeric",
|
||||
"foreground": "B5CEA8"
|
||||
},
|
||||
{
|
||||
"token": "constant.language",
|
||||
"foreground": "56B6C2",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "support.constant",
|
||||
"foreground": "56B6C2",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "string",
|
||||
"foreground": "D19A66"
|
||||
},
|
||||
{
|
||||
"token": "meta.preprocessor",
|
||||
"foreground": "C586C0",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control.directive",
|
||||
"foreground": "C586C0",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "operator",
|
||||
"foreground": "D4D4D4"
|
||||
},
|
||||
{
|
||||
"token": "invalid",
|
||||
"foreground": "FFFFFF",
|
||||
"background": "F44747"
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"editor.foreground": "#D4D4D4",
|
||||
"editor.background": "#1E1E1E",
|
||||
"editor.selectionBackground": "#2C313A",
|
||||
"editor.lineHighlightBackground": "#2A2D2E",
|
||||
"editorCursor.foreground": "#AEAFAD",
|
||||
"editorWhitespace.foreground": "#404040"
|
||||
}
|
||||
}
|
||||
}
|
||||
116
common/templates/json/tree-sitter/themes/dark-python.json
Normal file
116
common/templates/json/tree-sitter/themes/dark-python.json
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"monacoTreeSitter": {
|
||||
"type": "#0ca1a6",
|
||||
"scope": "#dae3e3",
|
||||
"function": "#F39C12",
|
||||
"variable": "#dae3e3",
|
||||
"number": "#7fcbcd",
|
||||
"string": "#7fcbcd",
|
||||
"comment": "#7f8c8d",
|
||||
"constant": "#7fcbcd",
|
||||
"directive": "#C586C0",
|
||||
"control": "#0ca1a6",
|
||||
"operator": "#dae3e3",
|
||||
"modifier": "#0ca1a6",
|
||||
"punctuation": "#dae3e3"
|
||||
},
|
||||
"base": {
|
||||
"base": "vs-dark",
|
||||
"inherit": true,
|
||||
"rules": [
|
||||
{
|
||||
"token": "comment",
|
||||
"foreground": "7f8c8d"
|
||||
},
|
||||
{
|
||||
"token": "keyword",
|
||||
"foreground": "0ca1a6"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control",
|
||||
"foreground": "0ca1a6"
|
||||
},
|
||||
{
|
||||
"token": "storage",
|
||||
"foreground": "0ca1a6"
|
||||
},
|
||||
{
|
||||
"token": "storage.type",
|
||||
"foreground": "0ca1a6"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.type",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "support.type",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.function",
|
||||
"foreground": "F39C12"
|
||||
},
|
||||
{
|
||||
"token": "support.function",
|
||||
"foreground": "F39C12"
|
||||
},
|
||||
{
|
||||
"token": "meta.function-call",
|
||||
"foreground": "F39C12"
|
||||
},
|
||||
{
|
||||
"token": "variable",
|
||||
"foreground": "dae3e3"
|
||||
},
|
||||
{
|
||||
"token": "variable.parameter",
|
||||
"foreground": "dae3e3"
|
||||
},
|
||||
{
|
||||
"token": "constant.numeric",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "constant.language",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "support.constant",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "string",
|
||||
"foreground": "7fcbcd"
|
||||
},
|
||||
{
|
||||
"token": "meta.preprocessor",
|
||||
"foreground": "C586C0"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control.directive",
|
||||
"foreground": "C586C0"
|
||||
},
|
||||
{
|
||||
"token": "operator",
|
||||
"foreground": "dae3e3"
|
||||
},
|
||||
{
|
||||
"token": "punctuation",
|
||||
"foreground": "dae3e3"
|
||||
},
|
||||
{
|
||||
"token": "invalid",
|
||||
"foreground": "ffffff",
|
||||
"background": "df7365"
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"editor.background": "#1f272a",
|
||||
"editor.foreground": "#dae3e3",
|
||||
"editor.selectionBackground": "#00818480",
|
||||
"editor.lineHighlightBackground": "#434f5410",
|
||||
"editorCursor.foreground": "#dae3e3",
|
||||
"editorWhitespace.foreground": "#374146"
|
||||
}
|
||||
}
|
||||
}
|
||||
113
common/templates/json/tree-sitter/themes/light-cpp.json
Normal file
113
common/templates/json/tree-sitter/themes/light-cpp.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"monacoTreeSitter": {
|
||||
"type": "#005C5F",
|
||||
"scope": "#4e5b61",
|
||||
"function": "#D35400",
|
||||
"variable": "#4e5b61",
|
||||
"number": "#005C5F",
|
||||
"string": "#005C5F",
|
||||
"comment": "#95a5a6cc",
|
||||
"constant": "#005C5F",
|
||||
"directive": "#728E00",
|
||||
"control": "#00979D",
|
||||
"operator": "#4e5b61",
|
||||
"modifier": "#00979D",
|
||||
"punctuation": "#4e5b61"
|
||||
},
|
||||
"base": {
|
||||
"base": "vs",
|
||||
"inherit": true,
|
||||
"rules": [
|
||||
{
|
||||
"token": "comment",
|
||||
"foreground": "95a5a6"
|
||||
},
|
||||
{
|
||||
"token": "keyword",
|
||||
"foreground": "00979D"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control",
|
||||
"foreground": "00979D"
|
||||
},
|
||||
{
|
||||
"token": "storage",
|
||||
"foreground": "00979D"
|
||||
},
|
||||
{
|
||||
"token": "storage.type",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.type",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "support.type",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.function",
|
||||
"foreground": "D35400"
|
||||
},
|
||||
{
|
||||
"token": "support.function",
|
||||
"foreground": "D35400"
|
||||
},
|
||||
{
|
||||
"token": "meta.function-call",
|
||||
"foreground": "D35400"
|
||||
},
|
||||
{
|
||||
"token": "variable",
|
||||
"foreground": "4e5b61"
|
||||
},
|
||||
{
|
||||
"token": "variable.parameter",
|
||||
"foreground": "4e5b61"
|
||||
},
|
||||
{
|
||||
"token": "constant.numeric",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "constant.language",
|
||||
"foreground": "005C5F",
|
||||
"fontStyle": "bold"
|
||||
},
|
||||
{
|
||||
"token": "support.constant",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "string",
|
||||
"foreground": "005C5F"
|
||||
},
|
||||
{
|
||||
"token": "meta.preprocessor",
|
||||
"foreground": "728E00"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control.directive",
|
||||
"foreground": "728E00"
|
||||
},
|
||||
{
|
||||
"token": "operator",
|
||||
"foreground": "4e5b61"
|
||||
},
|
||||
{
|
||||
"token": "invalid",
|
||||
"foreground": "ffffff",
|
||||
"background": "df7365"
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"editor.foreground": "#4e5b61",
|
||||
"editor.background": "#ffffff",
|
||||
"editor.selectionBackground": "#7fcbcdb3",
|
||||
"editor.lineHighlightBackground": "#434f5410",
|
||||
"editorCursor.foreground": "#4e5b61",
|
||||
"editorWhitespace.foreground": "#bfbfbf"
|
||||
}
|
||||
}
|
||||
}
|
||||
104
common/templates/json/tree-sitter/themes/light-python.json
Normal file
104
common/templates/json/tree-sitter/themes/light-python.json
Normal file
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"monacoTreeSitter": {
|
||||
"type": "#267F99",
|
||||
"scope": "#333333",
|
||||
"function": "#795E26",
|
||||
"variable": "#333333",
|
||||
"number": "#098658",
|
||||
"string": "#A31515",
|
||||
"comment": "#008000",
|
||||
"constant": "#0451A5",
|
||||
"directive": "#AF00DB",
|
||||
"control": "#AF00DB",
|
||||
"operator": "#333333",
|
||||
"modifier": "#AF00DB",
|
||||
"punctuation": "#333333"
|
||||
},
|
||||
"base": {
|
||||
"base": "vs",
|
||||
"inherit": true,
|
||||
"rules": [
|
||||
{
|
||||
"token": "comment",
|
||||
"foreground": "008000"
|
||||
},
|
||||
{
|
||||
"token": "keyword",
|
||||
"foreground": "AF00DB"
|
||||
},
|
||||
{
|
||||
"token": "keyword.control",
|
||||
"foreground": "AF00DB"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.class",
|
||||
"foreground": "267F99"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.type",
|
||||
"foreground": "267F99"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.function",
|
||||
"foreground": "795E26"
|
||||
},
|
||||
{
|
||||
"token": "support.function.builtin",
|
||||
"foreground": "0451A5"
|
||||
},
|
||||
{
|
||||
"token": "variable.parameter",
|
||||
"foreground": "001080"
|
||||
},
|
||||
{
|
||||
"token": "variable.language.self",
|
||||
"foreground": "001080"
|
||||
},
|
||||
{
|
||||
"token": "entity.name.function.magic",
|
||||
"foreground": "001080"
|
||||
},
|
||||
{
|
||||
"token": "meta.decorator",
|
||||
"foreground": "AF00DB"
|
||||
},
|
||||
{
|
||||
"token": "string",
|
||||
"foreground": "A31515"
|
||||
},
|
||||
{
|
||||
"token": "string.doc",
|
||||
"foreground": "008000"
|
||||
},
|
||||
{
|
||||
"token": "constant.numeric",
|
||||
"foreground": "098658"
|
||||
},
|
||||
{
|
||||
"token": "constant.language",
|
||||
"foreground": "0451A5"
|
||||
},
|
||||
{
|
||||
"token": "punctuation",
|
||||
"foreground": "333333"
|
||||
},
|
||||
{
|
||||
"token": "keyword.operator",
|
||||
"foreground": "333333"
|
||||
},
|
||||
{
|
||||
"token": "invalid",
|
||||
"foreground": "FFFFFF",
|
||||
"background": "E51400"
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"editor.background": "#FFFFFF",
|
||||
"editor.foreground": "#333333",
|
||||
"editor.selectionBackground": "#ADD6FF",
|
||||
"editor.lineHighlightBackground": "#FFFFFF",
|
||||
"editorCursor.foreground": "#000000",
|
||||
"editorWhitespace.foreground": "#BFBFBF"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user