Skip to content

Commit

Permalink
Add support for Robot Framework files (helix-editor#6611)
Browse files Browse the repository at this point in the history
* Add support for Robot Framework files

* Run docgen
  • Loading branch information
kareigu authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 4a3e762 commit d466234
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
| rego || | | `regols` |
| rescript ||| | `rescript-language-server` |
| rmarkdown || || `R` |
| robot || | | `robotframework_ls` |
| ron || || |
| rst || | | |
| ruby |||| `solargraph` |
Expand Down
14 changes: 14 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,20 @@ comment-token = "//"
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"
Expand Down
21 changes: 21 additions & 0 deletions runtime/queries/robot/highlights.scm
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit d466234

Please sign in to comment.