aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-09-26 00:09:41 -0700
committerGitHub <noreply@github.com>2024-09-26 09:09:41 +0200
commit679883ad31f1752cac92a4ca182cee8b2751d4f1 (patch)
tree162c86c3f7149fc177b0d7ee14779354d5dfac2e
parentbot(lockfile): update re2c (diff)
downloadnvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar.gz
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar.bz2
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar.lz
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar.xz
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.tar.zst
nvim-treesitter-679883ad31f1752cac92a4ca182cee8b2751d4f1.zip
feat(gleam,luau): use `@keyword.type` captures (#7181)
-rw-r--r--queries/gleam/highlights.scm3
-rw-r--r--queries/luau/highlights.scm7
-rw-r--r--tests/query/highlights/gleam/type.gleam6
3 files changed, 8 insertions, 8 deletions
diff --git a/queries/gleam/highlights.scm b/queries/gleam/highlights.scm
index 9daf9b8b2..5238c601b 100644
--- a/queries/gleam/highlights.scm
+++ b/queries/gleam/highlights.scm
@@ -4,10 +4,11 @@
"let"
"panic"
"todo"
- "type"
"use"
] @keyword
+"type" @keyword.type
+
; Function Keywords
"fn" @keyword.function
diff --git a/queries/luau/highlights.scm b/queries/luau/highlights.scm
index dcb866c51..f6f64b30c 100644
--- a/queries/luau/highlights.scm
+++ b/queries/luau/highlights.scm
@@ -4,10 +4,9 @@
; Keywords
"return" @keyword.return
-[
- "local"
- "type"
-] @keyword
+"local" @keyword
+
+"type" @keyword.type
"export" @keyword.import
diff --git a/tests/query/highlights/gleam/type.gleam b/tests/query/highlights/gleam/type.gleam
index de0f9c4af..5b0aa021f 100644
--- a/tests/query/highlights/gleam/type.gleam
+++ b/tests/query/highlights/gleam/type.gleam
@@ -1,6 +1,6 @@
pub type Cat {
// <- @keyword.modifier
-// ^^^^ @keyword
+// ^^^^ @keyword.type
// ^^^ @type
// ^ @punctuation.bracket
Cat(name: String, cuteness: Int)
@@ -38,7 +38,7 @@ fn cats() {
}
type Box(inner_type) {
-// <- @keyword
+// <- @keyword.type
// ^^^ @type
// ^ @punctuation.bracket
// ^^^^^^^^^^ @type
@@ -56,7 +56,7 @@ type Box(inner_type) {
pub opaque type Counter {
// <- @keyword.modifier
// ^^^^^^ @keyword.modifier
-// ^^^^ @keyword
+// ^^^^ @keyword.type
// ^^^^^^^ @type
// ^ @punctuation.bracket
Counter(value: Int)