on master help sign in
Update Unison highlights (#8315)
commit7fa5f341e931f9bdb4058e51ebf77276e9b82242 authorzetashift <rskaraya@gmail.com> dateSun 17 Sep 2023, 20:23 (3 years ago) parentcb39242
1 file changed+21−6
runtime/queries/unison/highlights.scm+21−6
runtime/queries/unison/highlights.scm+21−6
@@ -10,14 +10,18 @@
1010[
1111 (kw_forall)
1212 (unique_kw)
13+ (structural_kw)
1314 (type_kw)
1415 (kw_equals)
1516 (do)
17+ (ability)
18+ (where)
1619] @keyword
1720
1821(kw_let) @keyword.function
1922(type_kw) @keyword.storage.type
2023(unique) @keyword.storage.modifier
24+(structural) @keyword.storage.modifier
2125("use") @keyword.control.import
2226
2327
@@ -31,6 +35,7 @@
3135 (arrow_symbol)
3236 (">")
3337 (or)
38+ (and)
3439 (bang)
3540] @operator
3641
@@ -47,13 +52,22 @@
4752
4853;; Types
4954(record_field name: (wordy_id) @variable.other.member type: (wordy_id) @type)
50−[
51− (type_name)
52− (type_signature)
53− (effect)
54−] @type
55+(type_constructor (type_name (wordy_id) @constructor))
56+(ability_declaration type_name: (wordy_id) @type type_arg: (wordy_id) @variable.parameter)
57+(effect (wordy_id) @special) ;; NOTE: an effect is just like a type, but in signature we special case it
58+
59+;; Namespaces
60+(path) @namespace
61+(namespace) @namespace
62+
63+;; Terms
64+(type_signature term_name: (path)? @variable term_name: (wordy_id) @variable)
65+(type_signature (wordy_id) @type)
66+(type_signature (delayed (wordy_id)) @type)
67+
68+(term_definition param: (wordy_id) @variable.parameter)
5569
56−(term_definition) @variable
70+(function_application function_name: (path)? function_name: (wordy_id) @function)
5771
5872;; Punctuation
5973[
@@ -70,3 +84,4 @@
7084 "]"
7185] @punctuation.bracket
7286
87+(test_watch_expression (wordy_id) @keyword.directive)