Skip to content

Comments

Add MariaDB highlighting model#5921

Open
rozhnev wants to merge 6 commits intoajaxorg:masterfrom
rozhnev:master
Open

Add MariaDB highlighting model#5921
rozhnev wants to merge 6 commits intoajaxorg:masterfrom
rozhnev:master

Conversation

@rozhnev
Copy link
Contributor

@rozhnev rozhnev commented Feb 8, 2026

Since MariaDB forked from MySQL it got many changes in SQL syntax, so I decided to add separate highlighting model.

This pull request introduces support for MariaDB syntax highlighting in the project. The main changes add a new mode for MariaDB, define its syntax highlighting rules, and integrate it into the list of supported modes.

MariaDB mode support:

  • Added src/mode/mariadb.js, which defines the new Mariadb mode, including comment syntax and inheritance from TextMode.
  • Added src/mode/mariadb_highlight_rules.js, which implements detailed syntax highlighting rules for MariaDB, including keywords, built-in functions, data types, numeric formats, string handling, and comment parsing.

Integration:

  • Updated src/ext/modelist.js to include Mariadb in the supportedModes mapping, enabling selection and use of the new mode.Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pull Request Checklist:

Open kitchen-sink @ ccd7ef9a8416f06be7a5575e3c22f6f0fdee262d

Open kitchen-sink @ ac556d0e5260db23aad7baf76d36f84370a836ab

Open kitchen-sink @ cb680f50628745e3e05d96a8b4a59d57dac2fc72

Open kitchen-sink @ b3821c19c731f6852db1bc7d37a5c9d20351d699

@akoreman
Copy link
Contributor

Thanks for your contribution! Could you run npm run update-types and commit the changes to the ace-modes.d.ts file (which should fix the failing CI step).

It would be great if you could also add a demo file for the new highlight rules, for example like done here for another language mode: https://github.com/ajaxorg/ace/pull/5823/changes#diff-c9d95c1c8bffb5c1e3e9e484278e10902e7dd4d3c481a94a8981169d11dfa22b.

@github-actions
Copy link

One of the public type files has been updated, plase make sure there are no backwards incompatible changes done in the PR.

@github-actions
Copy link

One of the public type files has been updated, plase make sure there are no backwards incompatible changes done in the PR.

@github-actions
Copy link

One of the public type files has been updated, plase make sure there are no backwards incompatible changes done in the PR.

@rozhnev
Copy link
Contributor Author

rozhnev commented Feb 16, 2026

Thanks for your contribution! Could you run npm run update-types and commit the changes to the ace-modes.d.ts file (which should fix the failing CI step).

It would be great if you could also add a demo file for the new highlight rules, for example like done here for another language mode: https://github.com/ajaxorg/ace/pull/5823/changes#diff-c9d95c1c8bffb5c1e3e9e484278e10902e7dd4d3c481a94a8981169d11dfa22b.

ace-modes.d.ts updated and added socumentation file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants