mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
highlights(gleam): use more specific groups
This commit is contained in:
parent
7c86e6ffc4
commit
276627849b
3 changed files with 21 additions and 17 deletions
|
|
@ -1,11 +1,7 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"as"
|
"as"
|
||||||
"const"
|
|
||||||
"external"
|
|
||||||
"let"
|
"let"
|
||||||
"opaque"
|
|
||||||
"pub"
|
|
||||||
"todo"
|
"todo"
|
||||||
"try"
|
"try"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
@ -88,8 +84,8 @@
|
||||||
; Comments
|
; Comments
|
||||||
[
|
[
|
||||||
(module_comment)
|
(module_comment)
|
||||||
(statement_comment)
|
(statement_comment)
|
||||||
(comment)
|
(comment)
|
||||||
] @comment
|
] @comment
|
||||||
|
|
||||||
; Unused Identifiers
|
; Unused Identifiers
|
||||||
|
|
@ -112,8 +108,8 @@
|
||||||
|
|
||||||
; Numbers
|
; Numbers
|
||||||
[
|
[
|
||||||
(integer)
|
(integer)
|
||||||
(float)
|
(float)
|
||||||
(bit_string_segment_option_unit)
|
(bit_string_segment_option_unit)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
|
|
@ -142,6 +138,14 @@
|
||||||
; Type Variables
|
; Type Variables
|
||||||
(type_var) @type
|
(type_var) @type
|
||||||
|
|
||||||
|
; Type Qualifiers
|
||||||
|
[
|
||||||
|
"const"
|
||||||
|
"external"
|
||||||
|
"opaque"
|
||||||
|
"pub"
|
||||||
|
] @type.qualifier
|
||||||
|
|
||||||
; Tuples
|
; Tuples
|
||||||
(tuple_access index: (integer) @operator)
|
(tuple_access index: (integer) @operator)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
pub fn add(x: Int, y: Int) -> Int {
|
pub fn add(x: Int, y: Int) -> Int {
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ function
|
// ^ function
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
@ -18,7 +18,7 @@ pub fn add(x: Int, y: Int) -> Int {
|
||||||
// <- punctuation.bracket
|
// <- punctuation.bracket
|
||||||
|
|
||||||
pub fn twice(f: fn(t) -> t, x: t) -> t {
|
pub fn twice(f: fn(t) -> t, x: t) -> t {
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ function
|
// ^ function
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
@ -100,8 +100,8 @@ fn replace(
|
||||||
// <- punctuation.bracket
|
// <- punctuation.bracket
|
||||||
|
|
||||||
pub external fn random_float() -> Float = "rand" "uniform"
|
pub external fn random_float() -> Float = "rand" "uniform"
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword
|
// ^ type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ function
|
// ^ function
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
@ -113,8 +113,8 @@ pub external fn random_float() -> Float = "rand" "uniform"
|
||||||
// ^ function
|
// ^ function
|
||||||
|
|
||||||
pub external fn inspect(a) -> a = "Elixir.IO" "inspect"
|
pub external fn inspect(a) -> a = "Elixir.IO" "inspect"
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword
|
// ^ type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ function
|
// ^ function
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
pub type Cat {
|
pub type Cat {
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ type
|
// ^ type
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
@ -53,8 +53,8 @@ type Box(inner_type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub opaque type Counter {
|
pub opaque type Counter {
|
||||||
// <- keyword
|
// <- type.qualifier
|
||||||
// ^ keyword
|
// ^ type.qualifier
|
||||||
// ^ keyword.function
|
// ^ keyword.function
|
||||||
// ^ type
|
// ^ type
|
||||||
// ^ punctuation.bracket
|
// ^ punctuation.bracket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue