-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql.nanorc
26 lines (17 loc) · 3.73 KB
/
sql.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Syntax highlighting for SQL:2023 files.
syntax sql "\.sql$"
comment "-- "
tabgives " "
# Keywords.
icolor blue "\<(ABS|ABSENT|ACOS|ALL|ALLOCATE|ALTER|AND|ANY|ANY_VALUE|ARE|ARRAY|ARRAY_AGG|ARRAY_MAX_CARDINALITY|AS|ASENSITIVE|ASIN|ASYMMETRIC|AT|ATAN|ATOMIC|AUTHORIZATION|AVG|BEGIN|BEGIN_FRAME|BEGIN_PARTITION|BETWEEN|BIGINT|BINARY|BLOB|BOOLEAN|BOTH|BTRIM|BY|CALL|CALLED|CARDINALITY|CASCADED|CASE|CAST|CEIL|CEILING|CHAR|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CLASSIFIER|CLOB|CLOSE|COALESCE|COLLATE|COLLECT|COLUMN|COMMIT|CONDITION|CONNECT|CONSTRAINT|CONTAINS|CONVERT|COPY|CORR|CORRESPONDING|COS|COSH|COUNT|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_ROW|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CURRENT_USER|CURSOR|CYCLE|DATALINK|DATE|DAY|DEALLOCATE|DEC|DECFLOAT|DECIMAL|DECLARE|DEFAULT|DEFINE|DELETE|DENSE_RANK|DEREF|DESCRIBE|DETERMINISTIC|DISCONNECT|DISTINCT|DLNEWCOPY|DLPREVIOUSCOPY|DLURLCOMPLETE|DLURLCOMPLETEONLY|DLURLCOMPLETEWRITE|DLURLPATH|DLURLPATHONLY|DLURLPATHWRITE|DLURLSCHEME|DLURLSERVER|DLVALUE|DOUBLE|DROP|DYNAMIC|EACH|ELEMENT|ELSE|EMPTY|END|END-EXEC|END_FRAME|END_PARTITION|EQUALS|ESCAPE|EVERY|EXCEPT|EXEC|EXECUTE|EXISTS|EXP|EXTERNAL|EXTRACT|FALSE|FETCH|FILTER|FIRST_VALUE|FLOAT|FLOOR|FOR|FOREIGN|FRAME_ROW|FREE|FROM|FULL|FUNCTION|FUSION|GET|GLOBAL|GRANT|GREATEST|GROUP|GROUPING|GROUPS|HAVING|HOLD|HOUR|IDENTITY|IMPORT|IN|INDICATOR|INITIAL|INNER|INOUT|INSENSITIVE|INSERT|INT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|JOIN|JSON|JSON_ARRAY|JSON_ARRAYAGG|JSON_EXISTS|JSON_OBJECT|JSON_OBJECTAGG|JSON_QUERY|JSON_SCALAR|JSON_SERIALIZE|JSON_TABLE|JSON_TABLE_PRIMITIVE|JSON_VALUE|LAG|LANGUAGE|LARGE|LAST_VALUE|LATERAL|LEAD|LEADING|LEAST|LEFT|LIKE|LIKE_REGEX|LISTAGG|LN|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOG|LOG10|LOWER|LPAD|LTRIM|MATCH|MATCHES|MATCH_NUMBER|MATCH_RECOGNIZE|MAX|MEMBER|MERGE|METHOD|MIN|MINUTE|MOD|MODIFIES|MODULE|MONTH|MULTISET|NATIONAL|NATURAL|NCHAR|NCLOB|NEW|NO|NONE|NORMALIZE|NOT|NTH_VALUE|NTILE|NULL|NULLIF|NUMERIC|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFFSET|OLD|OMIT|ON|ONE|ONLY|OPEN|OR|ORDER|OUT|OUTER|OVER|OVERLAPS|OVERLAY|PARAMETER|PARTITION|PATTERN|PER|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PERIOD|PORTION|POSITION|POSITION_REGEX|POWER|PRECEDES|PRECISION|PREPARE|PRIMARY|PROCEDURE|PTF|RANGE|RANK|READS|REAL|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELEASE|RESULT|RETURN|RETURNS|REVOKE|RIGHT|ROLLBACK|ROLLUP|ROW|ROWS|ROW_NUMBER|RPAD|RTRIM|RUNNING|SAVEPOINT|SCOPE|SCROLL|SEARCH|SECOND|SEEK|SELECT|SENSITIVE|SESSION_USER|SET|SHOW|SIMILAR|SIN|SINH|SKIP|SMALLINT|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLEXCEPTION|SQLSTATE|SQLWARNING|SQRT|START|STATIC|STDDEV_POP|STDDEV_SAMP|SUBMULTISET|SUBSET|SUBSTRING|SUBSTRING_REGEX|SUCCEEDS|SUM|SYMMETRIC|SYSTEM|SYSTEM_TIME|SYSTEM_USER|TABLE|TABLESAMPLE|TAN|TANH|THEN|TIME|TIMESTAMP|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TRAILING|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRIM_ARRAY|TRUE|TRUNCATE|UESCAPE|UNION|UNIQUE|UNKNOWN|UNNEST|UPDATE|UPPER|USER|USING|VALUE|VALUES|VALUE_OF|VARBINARY|VARCHAR|VARYING|VAR_POP|VAR_SAMP|VERSIONING|WHEN|WHENEVER|WHERE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHOUT|XML|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|YEAR)\>"
# Identifiers.
color green ""([^"\]|\\.)*""
# Strings.
color green "'([^'\]|\\.)*'"
# Comments
color red "^ *--.*$"
color red "--('([^'\]|\\.)*'|[^'])*$"
# Multiline comments.
color red start="^ */\*" end="\*/ *$"
# Trailing whitespaces.
color ,green " +$"