tree-sitter-sql icon indicating copy to clipboard operation
tree-sitter-sql copied to clipboard

`ON` in `CREATE TRIGGER` breaks highlighting

Open demurky opened this issue 1 year ago • 0 comments

Example:

In line 2, omitting ON makes highlighting work correctly (but is invalid SQL of course).

CREATE TRIGGER IF NOT EXISTS mytrigger
AFTER UPDATE ON accounts
FOR EACH ROW
BEGIN
	UPDATE mytable SET mytime = CURRENT_TIMESTAMP WHERE id = OLD.id;
END;

Tested in neovim.

Trigger syntax:

https://sqlite.org/lang_createtrigger.html

https://www.postgresql.org/docs/current/sql-createtrigger.html

https://dev.mysql.com/doc/refman/8.4/en/trigger-syntax.html

demurky avatar Apr 09 '25 18:04 demurky