From 4a5720332dd54146313d64ae6031c48f45475d2c Mon Sep 17 00:00:00 2001 From: "Connor Lay (Clay)" Date: Fri, 11 Feb 2022 16:53:50 -0800 Subject: [PATCH] Highlight Gleam bitstrings --- queries/gleam/highlights.scm | 21 ++++++--------------- 1 file 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