Unnamed repository; edit this file 'description' to name the repository.
tree-sitter: update Inko grammar and queries (#14022)
Yorick Peterse 7 months ago
parent 22b184b · commit 715d4ae
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--languages.toml2
-rw-r--r--runtime/queries/inko/highlights.scm2
-rw-r--r--runtime/queries/inko/tags.scm14
4 files changed, 17 insertions, 3 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 9e1a9045..4586971b 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -112,7 +112,7 @@
| iex | ✓ | | | | |
| ini | ✓ | | | | |
| ink | ✓ | | | | |
-| inko | ✓ | ✓ | ✓ | | |
+| inko | ✓ | ✓ | ✓ | ✓ | |
| janet | ✓ | | | | |
| java | ✓ | ✓ | ✓ | | `jdtls` |
| javascript | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
diff --git a/languages.toml b/languages.toml
index fd6636ad..36c28296 100644
--- a/languages.toml
+++ b/languages.toml
@@ -3068,7 +3068,7 @@ formatter = { command = "inko", args = ["fmt", "-"] }
[[grammar]]
name = "inko"
-source = { git = "https://github.com/inko-lang/tree-sitter-inko", rev = "7860637ce1b43f5f79cfb7cc3311bf3234e9479f" }
+source = { git = "https://github.com/inko-lang/tree-sitter-inko", rev = "f58a87ac4dc6a7955c64c9e4408fbd693e804686" }
[[language]]
name = "bicep"
diff --git a/runtime/queries/inko/highlights.scm b/runtime/queries/inko/highlights.scm
index d5730dce..44138ef4 100644
--- a/runtime/queries/inko/highlights.scm
+++ b/runtime/queries/inko/highlights.scm
@@ -78,7 +78,7 @@
] @keyword.operator
[
- "class"
+ "type"
"trait"
] @keyword.storage.type
diff --git a/runtime/queries/inko/tags.scm b/runtime/queries/inko/tags.scm
new file mode 100644
index 00000000..42dbcfc9
--- /dev/null
+++ b/runtime/queries/inko/tags.scm
@@ -0,0 +1,14 @@
+(class
+ name: _ @definition.struct)
+
+(trait
+ name: _ @definition.interface)
+
+(external_function
+ name: _ @definition.function)
+
+(method
+ name: _ @definition.function)
+
+(define_constant
+ name: _ @definition.constant)