summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml14
-rw-r--r--runtime/queries/robot/highlights.scm21
3 files changed, 36 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 12cd2bab..3f56dd60 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -117,6 +117,7 @@
| rego | ✓ | | | `regols` |
| rescript | ✓ | ✓ | | `rescript-language-server` |
| rmarkdown | ✓ | | ✓ | `R` |
+| robot | ✓ | | | `robotframework_ls` |
| ron | ✓ | | ✓ | |
| rst | ✓ | | | |
| ruby | ✓ | ✓ | ✓ | `solargraph` |
diff --git a/languages.toml b/languages.toml
index 51ef3bcf..c643beab 100644
--- a/languages.toml
+++ b/languages.toml
@@ -1438,6 +1438,20 @@ indent = { tab-width = 4, unit = " " }
grammar = "rust"
[[language]]
+name = "robot"
+scope = "source.robot"
+injection-regex = "robot"
+file-types = ["robot", "resource"]
+comment-token = "#"
+roots = []
+indent = { tab-width = 4, unit = " " }
+language-server = { command = "robotframework_ls" }
+
+[[grammar]]
+name = "robot"
+source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927" }
+
+[[language]]
name = "r"
scope = "source.r"
injection-regex = "(r|R)"
diff --git a/runtime/queries/robot/highlights.scm b/runtime/queries/robot/highlights.scm
new file mode 100644
index 00000000..60f416b7
--- /dev/null
+++ b/runtime/queries/robot/highlights.scm
@@ -0,0 +1,21 @@
+(comment) @comment
+(ellipses) @punctuation.delimiter
+
+(section_header) @keyword
+(extra_text) @comment
+
+(setting_statement) @keyword
+
+(variable_definition (variable_name) @variable)
+
+(keyword_definition (name) @function)
+(keyword_definition (body (keyword_setting) @keyword))
+
+(test_case_definition (name) @property)
+
+(keyword_invocation (keyword) @function)
+
+(argument (text_chunk) @string)
+(argument (scalar_variable) @string.special)
+(argument (list_variable) @string.special)
+(argument (dictionary_variable) @string.special)