aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/purescript
diff options
context:
space:
mode:
authorblinxen2023-11-18 01:24:59 +0000
committerGitHub2023-11-18 01:24:59 +0000
commit39aa6fa646aeae08f4156558af199df1ecba4638 (patch)
tree8e1d06f954362c816951e3a035368935ff32cadc /runtime/queries/purescript
parent2579bca21c250050e59ef782380ca3f3ed44fbb0 (diff)
Update some grammars to a commit where the license file is included (#8691)
Diffstat (limited to 'runtime/queries/purescript')
-rw-r--r--runtime/queries/purescript/highlights.scm23
1 files changed, 19 insertions, 4 deletions
diff --git a/runtime/queries/purescript/highlights.scm b/runtime/queries/purescript/highlights.scm
index b110f3e0..b7868e6e 100644
--- a/runtime/queries/purescript/highlights.scm
+++ b/runtime/queries/purescript/highlights.scm
@@ -1,4 +1,20 @@
; ----------------------------------------------------------------------------
+; Record fields would need to come before literal strings in order to be captured correctly
+
+ (record_accessor
+ field: [ (variable)
+ (string)
+ (triple_quote_string)
+ ] @variable.other.member)
+
+ (exp_record_access
+ field: [ (variable)
+ (string)
+ (triple_quote_string)
+ ] @variable.other.member)
+
+
+; ----------------------------------------------------------------------------
; Literals and comments
(integer) @constant.numeric.integer
@@ -117,8 +133,7 @@
(row_field (field_name) @variable.other.member)
(record_field (field_name) @variable.other.member)
- (record_accessor (variable) @variable.other.member)
- (exp_record_access (variable) @variable.other.member)
+ (record_field (field_pun) @variable.other.member)
(signature name: (variable) @type)
(function name: (variable) @function)
@@ -126,8 +141,8 @@
(derive_declaration (instance_name) @function)
; true or false
-((variable) @constant.builtin.boolean
- (#match? @constant.builtin.boolean "^(true|false)$"))
+ ((variable) @constant.builtin.boolean
+ (#match? @constant.builtin.boolean "^(true|false)$"))
; The former one works for `tree-sitter highlight` but not in Helix/Kakoune.
; The latter two work in Helix (but not Kakoune) and are a good compromise between not highlighting anything at all