on master help sign in
Add support for Robot Framework files (#6611)

* Add support for Robot Framework files * Run docgen

commit1148ce1fd9941e00bd416bce1f06a987d0e7b5f2 authorkarei <31644842+kareigu@users.noreply.github.com> dateFri 7 Apr 2023, 03:19 (4 years ago) parentb663b89
3 files changed+36
book/src/generated/lang-support.md+1 languages.toml+14 runtime/queries/robot/highlights.scm+21
book/src/generated/lang-support.md+1
@@ -117,6 +117,7 @@
117117| rego | ✓ | | | `regols` |
118118| rescript | ✓ | ✓ | | `rescript-language-server` |
119119| rmarkdown | ✓ | | ✓ | `R` |
120+| robot | ✓ | | | `robotframework_ls` |
120121| ron | ✓ | | ✓ | |
121122| rst | ✓ | | | |
122123| ruby | ✓ | ✓ | ✓ | `solargraph` |
languages.toml+14
@@ -1437,6 +1437,20 @@ comment-token = "//"
14371437indent = { tab-width = 4, unit = " " }
14381438grammar = "rust"
14391439
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+
14401454[[language]]
14411455name = "r"
14421456scope = "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)