Skip to content

Commit

Permalink
feat: #167 support dt highlight style
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Jan 9, 2025
1 parent 1f85539 commit ab7cf31
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 32 deletions.
7 changes: 6 additions & 1 deletion src/languages/flink/flink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,14 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@comments' },
{ include: '@whitespace' },
{ include: '@pseudoColumns' },
{ include: '@customParams' },
{ include: '@numbers' },
{ include: '@strings' },
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexDataTypes' },
{ include: '@complexFunctions' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@#$]+/,
Expand Down Expand Up @@ -535,6 +536,10 @@ export const language = <languages.IMonarchLanguage>{
}
]
],
customParams: [
[/\${[A-Za-z0-9._-]*}/, TokenClassConsts.VARIABLE],
[/\@\@{[A-Za-z0-9._-]*}/, TokenClassConsts.VARIABLE]
],
numbers: [
[/0[xX][0-9a-fA-F]*/, TokenClassConsts.NUMBER_HEX],
[/[$][+-]*\d*(\.\d*)?/, TokenClassConsts.NUMBER],
Expand Down
2 changes: 1 addition & 1 deletion src/languages/hive/hive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexDataTypes' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@#$]+/,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/impala/impala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@scopes' },
{ include: '@complexDataTypes' },
{ include: '@complexOperators' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@#$]+/,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/mysql/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexOperators' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@]+/,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/pgsql/pgsql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexDataTypes' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@#$]+/,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/spark/spark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexDataTypes' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@#$]+/,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/trino/trino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
{ include: '@complexDataTypes' },
[/[;,.]/, TokenClassConsts.DELIMITER],
[/[:;,.]/, TokenClassConsts.DELIMITER],
[/[\(\)\[\]\{\}]/, '@brackets'],
[
/[\w@$-]+/, // https://trino.io/docs/current/language/reserved.html#language-identifiers
Expand Down
50 changes: 25 additions & 25 deletions src/theme/vs-plus/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ export const lightThemeData: editor.IStandaloneThemeData = {
base: 'vs',
inherit: true,
rules: [
{ token: postfixTokenClass(TokenClassConsts.BINARY), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.BINARY_ESCAPE), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.COMMENT), foreground: '008000' },
{ token: postfixTokenClass(TokenClassConsts.COMMENT_QUOTE), foreground: '008000' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER), foreground: '000000' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_CURLY), foreground: '319331' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_PAREN), foreground: '0431fa' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_SQUARE), foreground: '0431fa' },
{ token: postfixTokenClass(TokenClassConsts.IDENTIFIER), foreground: '001080' },
{ token: postfixTokenClass(TokenClassConsts.IDENTIFIER_QUOTE), foreground: '001080' },
{ token: postfixTokenClass(TokenClassConsts.KEYWORD), foreground: '0000ff' },
{ token: postfixTokenClass(TokenClassConsts.KEYWORD_SCOPE), foreground: 'af00db' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_FLOAT), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_BINARY), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_OCTAL), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_HEX), foreground: '098658' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR), foreground: '000000' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR_KEYWORD), foreground: '0000ff' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR_SYMBOL), foreground: '000000' },
{ token: postfixTokenClass(TokenClassConsts.PREDEFINED), foreground: '795e26' },
{ token: postfixTokenClass(TokenClassConsts.STRING), foreground: 'a31515' },
{ token: postfixTokenClass(TokenClassConsts.STRING_ESCAPE), foreground: 'a31515' },
{ token: postfixTokenClass(TokenClassConsts.TYPE), foreground: '267f99' },
{ token: postfixTokenClass(TokenClassConsts.VARIABLE), foreground: '4fc1ff' }
{ token: postfixTokenClass(TokenClassConsts.BINARY), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.BINARY_ESCAPE), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_FLOAT), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_BINARY), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_OCTAL), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.NUMBER_HEX), foreground: '45AB5A' },
{ token: postfixTokenClass(TokenClassConsts.COMMENT), foreground: 'B1B4C5' },
{ token: postfixTokenClass(TokenClassConsts.COMMENT_QUOTE), foreground: 'B1B4C5' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER), foreground: '7D98B1' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR), foreground: '7D98B1' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR_SYMBOL), foreground: '7D98B1' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_CURLY), foreground: 'B1BB86' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_PAREN), foreground: 'B1BB86' },
{ token: postfixTokenClass(TokenClassConsts.DELIMITER_SQUARE), foreground: 'B1BB86' },
{ token: postfixTokenClass(TokenClassConsts.IDENTIFIER), foreground: '201A1A' },
{ token: postfixTokenClass(TokenClassConsts.IDENTIFIER_QUOTE), foreground: '201A1A' },
{ token: postfixTokenClass(TokenClassConsts.KEYWORD), foreground: '3300FF' },
{ token: postfixTokenClass(TokenClassConsts.OPERATOR_KEYWORD), foreground: '3300FF' },
{ token: postfixTokenClass(TokenClassConsts.KEYWORD_SCOPE), foreground: 'E221DA' },
{ token: postfixTokenClass(TokenClassConsts.PREDEFINED), foreground: 'C3771C' },
{ token: postfixTokenClass(TokenClassConsts.STRING), foreground: 'BC1313' },
{ token: postfixTokenClass(TokenClassConsts.STRING_ESCAPE), foreground: 'BC1313' },
{ token: postfixTokenClass(TokenClassConsts.TYPE), foreground: '256FC6' },
{ token: postfixTokenClass(TokenClassConsts.VARIABLE), foreground: '00AD84' }
],
colors: {}
};

0 comments on commit ab7cf31

Please sign in to comment.