Skip to content

Commit

Permalink
feat: support mysql (#85)
Browse files Browse the repository at this point in the history
* feat: OPERATOR rename to OPERATORS

* feat: support mysql

* feat: mysql typeKeywords

* feat: mysql only consider reserved keywords

---------

Co-authored-by: liuyi <[email protected]>
  • Loading branch information
liuxy0551 and liuyi authored Dec 8, 2023
1 parent 2cad6b3 commit 4e7d9d4
Show file tree
Hide file tree
Showing 6 changed files with 469 additions and 679 deletions.
7 changes: 4 additions & 3 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export const TokenClassConsts = {
NUMBER_BINARY: 'number.binary',
NUMBER_OCTAL: 'number.octal',
NUMBER_HEX: 'number.hex',
OPERATOR: 'operators',
OPERATOR_KEYWORD: 'operators.keyword',
OPERATOR_SYMBOL: 'operators.symbol',
OPERATOR: 'operator',
OPERATOR_KEYWORD: 'operator.keyword',
OPERATOR_SYMBOL: 'operator.symbol',
PREDEFINED: 'predefined',
STRING: 'string',
STRING_DOUBLE: 'string.double',
STRING_ESCAPE: 'string.escape',
TYPE: 'type',
VARIABLE: 'variable',
Expand Down
6 changes: 3 additions & 3 deletions src/mysql/mysql.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { LanguageIdEnum } from '../common/constants';

registerLanguage({
id: LanguageIdEnum.MYSQL,
extensions: [],
aliases: ['MySQL'],
extensions: ['mysql'],
aliases: ['MySQL', 'mysql'],
loader: () => import('./mysql')
});

loadLanguage(LanguageIdEnum.MYSQL);

setupLanguageFeatures({
languageId: LanguageIdEnum.MYSQL,
completionItems: false,
completionItems: true,
diagnostics: true
});
Loading

0 comments on commit 4e7d9d4

Please sign in to comment.