aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConnor Lay (Clay) <connorlay@pm.me>2022-02-11 16:53:50 -0800
committerStephan Seitz <stephan.seitz@fau.de>2022-02-15 19:01:02 +0100
commit4a5720332dd54146313d64ae6031c48f45475d2c (patch)
tree02c437a6bae9838dd8b60969b5e33f23263f4e95
parentAdd Gleam injections (diff)
downloadnvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar.gz
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar.bz2
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar.lz
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar.xz
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.tar.zst
nvim-treesitter-4a5720332dd54146313d64ae6031c48f45475d2c.zip
Highlight Gleam bitstrings
-rw-r--r--queries/gleam/highlights.scm21
1 files changed, 6 insertions, 15 deletions
diff --git a/queries/gleam/highlights.scm b/queries/gleam/highlights.scm
index e39a9c92f..33c54a355 100644
--- a/queries/gleam/highlights.scm
+++ b/queries/gleam/highlights.scm
@@ -97,9 +97,9 @@
; Modules & Imports
(module ("/" @namespace)?) @namespace
-(remote_type_identifier module: (identifier) @namespace)
(import alias: ((identifier) @namespace)?)
-
+(remote_type_identifier module: (identifier) @namespace)
+(unqualified_import name: (identifier) @function)
; Identifiers
(identifier) @variable
@@ -107,14 +107,14 @@
; Strings
(string) @string
-; TODO Escape Sequences
-
-; TODO: Bit Strings
+; Bit Strings
+(bit_string_segment) @string.special
; Numbers
[
(integer)
(float)
+ (bit_string_segment_option_unit)
] @number
; Function Parameter Labels
@@ -142,17 +142,11 @@
(tuple_access index: (integer) @operator)
; Functions
-(public_function name: (identifier) @function)
-
(function name: (identifier) @function)
-
+(public_function name: (identifier) @function)
(function_call function: (identifier) @function)
-
(function_call function: (field_access record: (identifier) @namespace field: (label) @function))
-; Unqualified Imports
-(unqualified_import name: (identifier) @function)
-
; External Functions
(public_external_function name: (identifier) @function)
(external_function_body (string) @namespace . (string) @function)
@@ -162,6 +156,3 @@
; Parser Errors
(ERROR) @error
-
-; TODO does nvim-treesitter support #is-not? local matches for highlights?
-; see https://github.com/tree-sitter/tree-sitter/pull/448 for documentation