summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Bustos Torres <ema2159@gmail.com>2023-07-17 10:21:10 +0200
committerGitHub <noreply@github.com>2023-07-17 10:21:10 +0200
commitdd6964575e6ced69d582b7b9ffa46c240744c56f (patch)
treecce0577a0f4fbe079f2de19f5cad968528b250b5
parentUpdate parsers: arduino, c, elixir, ocaml, ocaml_interface, wing (diff)
downloadnvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar.gz
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar.bz2
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar.lz
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar.xz
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.tar.zst
nvim-treesitter-dd6964575e6ced69d582b7b9ffa46c240744c56f.zip
feat: add Robot Framework parser and highlights
-rw-r--r--lockfile.json3
-rw-r--r--lua/nvim-treesitter/parsers.lua9
-rw-r--r--queries/robot/highlights.scm21
3 files changed, 33 insertions, 0 deletions
diff --git a/lockfile.json b/lockfile.json
index e794afb81..f0efe0817 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -440,6 +440,9 @@
"rnoweb": {
"revision": "502c1126dc6777f09af5bef16e72a42f75bd081e"
},
+ "robot": {
+ "revision": "f1142bfaa6acfce95e25d2c6d18d218f4f533927"
+ },
"ron": {
"revision": "ce6086b2c9e8e71065b8129d6c2289c5f66d1879"
},
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index a9e2f48c8..0819686a1 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -1309,6 +1309,15 @@ list.rnoweb = {
maintainers = { "@bamonroe" },
}
+list.robot = {
+ install_info = {
+ url = "https://github.com/Hubro/tree-sitter-robot",
+ files = { "src/parser.c" },
+ },
+ maintainers = { "@ema2159" },
+ experimental = true,
+}
+
list.ron = {
install_info = {
url = "https://github.com/amaanq/tree-sitter-ron",
diff --git a/queries/robot/highlights.scm b/queries/robot/highlights.scm
new file mode 100644
index 000000000..abff22c42
--- /dev/null
+++ b/queries/robot/highlights.scm
@@ -0,0 +1,21 @@
+(argument (dictionary_variable) @string.special)
+(argument (list_variable) @string.special)
+(argument (scalar_variable) @string.special)
+(argument (text_chunk) @string)
+
+(keyword_invocation (keyword) @function)
+
+(test_case_definition (name) @property)
+
+(keyword_definition (body (keyword_setting) @keyword))
+(keyword_definition (name) @function)
+
+(variable_definition (variable_name) @variable)
+
+(setting_statement) @keyword
+
+(extra_text) @comment
+(section_header) @keyword
+
+(ellipses) @punctuation.delimiter
+(comment) @comment