krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

scripts/queries/toml.scm

b98a6509c5ae75e5172dd333d1b6105fd6ceee0e
orgstar/scripts/queries/toml.scm history · blame · raw

15 lines · 583 bytes

 1; TOML highlights for Orgstar: table names as types, keys as properties. The grammar's own
 2; query captures whole pairs as properties, which colors values too.
 3(comment) @comment
 4(string) @string
 5(quoted_key) @string
 6[(integer) (float)] @number
 7(boolean) @constant
 8[(offset_date_time) (local_date_time) (local_date) (local_time)] @string.special
 9(table (bare_key) @type)
10(table (dotted_key (bare_key) @type))
11(table_array_element (bare_key) @type)
12(table_array_element (dotted_key (bare_key) @type))
13(pair (bare_key) @property)
14(pair (dotted_key (bare_key) @property))
15"=" @operator