aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Levin <34550675+opa-oz@users.noreply.github.com>2024-06-30 17:12:36 +0900
committerGitHub <noreply@github.com>2024-06-30 11:12:36 +0300
commitacea74c514f54c71c3e9e5a7b1857e61ec21c3bb (patch)
tree6ccb4e84fee761c3c5743368ea66dcee82bb6a14
parentbot(lockfile): update http, matlab, scala (diff)
downloadnvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar.gz
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar.bz2
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar.lz
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar.xz
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.tar.zst
nvim-treesitter-acea74c514f54c71c3e9e5a7b1857e61ec21c3bb.zip
feat: robots.txt support
-rw-r--r--lockfile.json3
-rw-r--r--lua/nvim-treesitter/parsers.lua8
-rw-r--r--queries/robots/highlights.scm7
-rw-r--r--queries/robots/injections.scm2
4 files changed, 20 insertions, 0 deletions
diff --git a/lockfile.json b/lockfile.json
index 001a1b827..6fc5a1b8f 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -608,6 +608,9 @@
"robot": {
"revision": "322e4cc65754d2b3fdef4f2f8a71e0762e3d13af"
},
+ "robots": {
+ "revision": "8e3a4205b76236bb6dbebdbee5afc262ce38bb62"
+ },
"roc": {
"revision": "6ea64b6434a45472bd87b0772fd84a017de0a557"
},
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index dcd03849d..652f5dbbe 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -1780,6 +1780,14 @@ list.robot = {
maintainers = { "@Hubro" },
}
+list.robots = {
+ install_info = {
+ url = "https://github.com/opa-oz/tree-sitter-robots-txt",
+ files = { "src/parser.c", "src/scanner.c" },
+ },
+ maintainers = { "@opa-oz" },
+}
+
list.roc = {
install_info = {
url = "https://github.com/faldor20/tree-sitter-roc",
diff --git a/queries/robots/highlights.scm b/queries/robots/highlights.scm
new file mode 100644
index 000000000..a2c55c74f
--- /dev/null
+++ b/queries/robots/highlights.scm
@@ -0,0 +1,7 @@
+(comment) @comment @spell
+
+(directive) @property
+
+(value) @string
+
+":" @punctuation.delimiter
diff --git a/queries/robots/injections.scm b/queries/robots/injections.scm
new file mode 100644
index 000000000..2f0e58eb6
--- /dev/null
+++ b/queries/robots/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))