aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzetashift2023-09-17 18:23:19 +0000
committerGitHub2023-09-17 18:23:19 +0000
commit7fa5f341e931f9bdb4058e51ebf77276e9b82242 (patch)
tree78885aeb68d6f6548c930632a60aabbe1dfdb610 /runtime
parentcb3924278372f8e065487b0785489ee6ad3cf660 (diff)
Update Unison highlights (#8315)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/unison/highlights.scm27
1 files changed, 21 insertions, 6 deletions
diff --git a/runtime/queries/unison/highlights.scm b/runtime/queries/unison/highlights.scm
index 8ec2b6ff..956dc582 100644
--- a/runtime/queries/unison/highlights.scm
+++ b/runtime/queries/unison/highlights.scm
@@ -10,14 +10,18 @@
[
(kw_forall)
(unique_kw)
+ (structural_kw)
(type_kw)
(kw_equals)
(do)
+ (ability)
+ (where)
] @keyword
(kw_let) @keyword.function
(type_kw) @keyword.storage.type
(unique) @keyword.storage.modifier
+(structural) @keyword.storage.modifier
("use") @keyword.control.import
@@ -31,6 +35,7 @@
(arrow_symbol)
(">")
(or)
+ (and)
(bang)
] @operator
@@ -47,13 +52,22 @@
;; Types
(record_field name: (wordy_id) @variable.other.member type: (wordy_id) @type)
-[
- (type_name)
- (type_signature)
- (effect)
-] @type
+(type_constructor (type_name (wordy_id) @constructor))
+(ability_declaration type_name: (wordy_id) @type type_arg: (wordy_id) @variable.parameter)
+(effect (wordy_id) @special) ;; NOTE: an effect is just like a type, but in signature we special case it
+
+;; Namespaces
+(path) @namespace
+(namespace) @namespace
+
+;; Terms
+(type_signature term_name: (path)? @variable term_name: (wordy_id) @variable)
+(type_signature (wordy_id) @type)
+(type_signature (delayed (wordy_id)) @type)
+
+(term_definition param: (wordy_id) @variable.parameter)
-(term_definition) @variable
+(function_application function_name: (path)? function_name: (wordy_id) @function)
;; Punctuation
[
@@ -70,3 +84,4 @@
"]"
] @punctuation.bracket
+(test_watch_expression (wordy_id) @keyword.directive)