diff --git a/syntax/sql.nanorc b/syntax/sql.nanorc index 7230cf4e..052cb9ce 100644 --- a/syntax/sql.nanorc +++ b/syntax/sql.nanorc @@ -15,15 +15,15 @@ color green "\<(date|int[48]|num|ts|tstz)range\>" color lagoon "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|BETWEEN|CAST|CHECKPOINT)\>" color lagoon "\<(CLOSE|CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS?|CONVERSION|COPY|CREATE)\>" color lagoon "\<(DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DISCARD|DISTINCT|DO|DOMAIN|DROP)\>" -color lagoon "\<(END|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>" -color lagoon "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTO)\>" +color lagoon "\<(END|EXCEPT|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>" +color lagoon "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTERSECT|INTO|IS)\>" color lagoon "\<(NATURAL )?(INNER |OUTER |CROSS |(LEFT|RIGHT|FULL)( OUTER)? )?JOIN\>" -color lagoon "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LOCK|MOVE|NOT|NOTIFY)\>" +color lagoon "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LIKE|LOCK|MOVE|NOT|NOTIFY|NULL)\>" color lagoon "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES)\>" -color lagoon "\<(RELEASE|RESET|RETURNING|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>" +color lagoon "\<(RELEASE|RESET|RETURN(S|ING)|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>" color lagoon "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|START|SYSTEM)\>" color lagoon "\<(TABLE(SPACE)?|TEXT SEARCH (CONFIGURATION|DICTIONARY|PARSER|TEMPLATE))\>" -color lagoon "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TYPE|UPDATE|USER( MAPPING)?|USING)\>" +color lagoon "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TYPE|UNION|UPDATE|USER( MAPPING)?|USING)\>" color lagoon "\<(VACUUM|VALUES|((REFRESH )?MATERIALIZED )?VIEW|WHERE|WITH)\>" # Flow control. @@ -36,18 +36,17 @@ color ,red ""[^"]+"" color normal ""[[:alpha:]_][[:alnum:]_$]*"" # Strings. -color green "'([^']|\\')*'" +color lime "'([^']|\\')*'" # Trailing whitespace. color ,green "[[:space:]]+$" # Comments. -color red "--.*" -color brightblue "//.*" -color brightblue start="/\*" end="\*/" +color pink "(--|//).*" +color pink start="/\*" end="\*/" # PostgreSQL default schemas. -color brightred "\<(pg_catalog|public)\>" +color grey "\<(pg_catalog|public)\>" # PostgreSQL PLs. -color brightblue "\" +color mauve "\<(SQL|pl(java|perlu?|pgsql|py|pythonu?|r|ruby|scheme|sh|tcl))\>"