on master help sign in
Add support for Robot Framework files (#6611)
1148ce1karei
book/src/generated/lang-support.md+1
@@ -117,6 +117,7 @@
117| rego | ✓ | | | `regols` |
117| rego | ✓ | | | `regols` |
118| rescript | ✓ | ✓ | | `rescript-language-server` |
118| rescript | ✓ | ✓ | | `rescript-language-server` |
119| rmarkdown | ✓ | | ✓ | `R` |
119| rmarkdown | ✓ | | ✓ | `R` |
120+| robot | ✓ | | | `robotframework_ls` |
120| ron | ✓ | | ✓ | |
121| ron | ✓ | | ✓ | |
121| rst | ✓ | | | |
122| rst | ✓ | | | |
122| ruby | ✓ | ✓ | ✓ | `solargraph` |
123| ruby | ✓ | ✓ | ✓ | `solargraph` |
languages.toml+14
@@ -1437,6 +1437,20 @@ comment-token = "//"
1437indent = { tab-width = 4, unit = " " }
1437indent = { tab-width = 4, unit = " " }
1438grammar = "rust"
1438grammar = "rust"
1439
1439
1440+[[language]]
1441+name = "robot"
1442+scope = "source.robot"
1443+injection-regex = "robot"
1444+file-types = ["robot", "resource"]
1445+comment-token = "#"
1446+roots = []
1447+indent = { tab-width = 4, unit = " " }
1448+language-server = { command = "robotframework_ls" }
1449+
1450+[[grammar]]
1451+name = "robot"
1452+source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927" }
1453+
1440[[language]]
1454[[language]]
1441name = "r"
1455name = "r"
1442scope = "source.r"
1456scope = "source.r"
runtime/queries/robot/highlights.scmnew file+21
@@ -0,0 +1,21 @@
1+(comment) @comment
2+(ellipses) @punctuation.delimiter
3+
4+(section_header) @keyword
5+(extra_text) @comment
6+
7+(setting_statement) @keyword
8+
9+(variable_definition (variable_name) @variable)
10+
11+(keyword_definition (name) @function)
12+(keyword_definition (body (keyword_setting) @keyword))
13+
14+(test_case_definition (name) @property)
15+
16+(keyword_invocation (keyword) @function)
17+
18+(argument (text_chunk) @string)
19+(argument (scalar_variable) @string.special)
20+(argument (list_variable) @string.special)
21+(argument (dictionary_variable) @string.special)