mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
Highlight Gleam bitstrings
This commit is contained in:
parent
49e1805e08
commit
4a5720332d
1 changed files with 6 additions and 15 deletions
|
|
@ -97,9 +97,9 @@
|
||||||
|
|
||||||
; Modules & Imports
|
; Modules & Imports
|
||||||
(module ("/" @namespace)?) @namespace
|
(module ("/" @namespace)?) @namespace
|
||||||
(remote_type_identifier module: (identifier) @namespace)
|
|
||||||
(import alias: ((identifier) @namespace)?)
|
(import alias: ((identifier) @namespace)?)
|
||||||
|
(remote_type_identifier module: (identifier) @namespace)
|
||||||
|
(unqualified_import name: (identifier) @function)
|
||||||
|
|
||||||
; Identifiers
|
; Identifiers
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
@ -107,14 +107,14 @@
|
||||||
; Strings
|
; Strings
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
; TODO Escape Sequences
|
; Bit Strings
|
||||||
|
(bit_string_segment) @string.special
|
||||||
; TODO: Bit Strings
|
|
||||||
|
|
||||||
; Numbers
|
; Numbers
|
||||||
[
|
[
|
||||||
(integer)
|
(integer)
|
||||||
(float)
|
(float)
|
||||||
|
(bit_string_segment_option_unit)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
; Function Parameter Labels
|
; Function Parameter Labels
|
||||||
|
|
@ -142,17 +142,11 @@
|
||||||
(tuple_access index: (integer) @operator)
|
(tuple_access index: (integer) @operator)
|
||||||
|
|
||||||
; Functions
|
; Functions
|
||||||
(public_function name: (identifier) @function)
|
|
||||||
|
|
||||||
(function name: (identifier) @function)
|
(function name: (identifier) @function)
|
||||||
|
(public_function name: (identifier) @function)
|
||||||
(function_call function: (identifier) @function)
|
(function_call function: (identifier) @function)
|
||||||
|
|
||||||
(function_call function: (field_access record: (identifier) @namespace field: (label) @function))
|
(function_call function: (field_access record: (identifier) @namespace field: (label) @function))
|
||||||
|
|
||||||
; Unqualified Imports
|
|
||||||
(unqualified_import name: (identifier) @function)
|
|
||||||
|
|
||||||
; External Functions
|
; External Functions
|
||||||
(public_external_function name: (identifier) @function)
|
(public_external_function name: (identifier) @function)
|
||||||
(external_function_body (string) @namespace . (string) @function)
|
(external_function_body (string) @namespace . (string) @function)
|
||||||
|
|
@ -162,6 +156,3 @@
|
||||||
|
|
||||||
; Parser Errors
|
; Parser Errors
|
||||||
(ERROR) @error
|
(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
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue