feat: add tmux parser

This commit is contained in:
wzy 2024-02-20 03:26:32 +08:00 committed by GitHub
parent 5b3e9861a2
commit e04ce8bcec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 69 additions and 0 deletions

View file

@ -403,6 +403,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [thrift](https://github.com/duskmoon314/tree-sitter-thrift) (maintained by @amaanq, @duskmoon314)
- [x] [tiger](https://github.com/ambroisie/tree-sitter-tiger) (maintained by @ambroisie)
- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko)
- [x] [tmux](https://github.com/Freed-Wu/tree-sitter-tmux) (maintained by @Freed-Wu)
- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt.git) (experimental, maintained by @arnarg)
- [x] [toml](https://github.com/ikatyang/tree-sitter-toml) (maintained by @tk-shirasaka)
- [x] [tsv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq)

View file

@ -689,6 +689,9 @@
"tlaplus": {
"revision": "aaf5bb5c1df0a6e583bb51efa519a9ac788b2ad8"
},
"tmux": {
"revision": "10737f5dc4d8e68c9667f11a6996688a1185755f"
},
"todotxt": {
"revision": "3937c5cd105ec4127448651a21aef45f52d19609"
},

View file

@ -1999,6 +1999,14 @@ list.tlaplus = {
maintainers = { "@ahelwer", "@susliko" },
}
list.tmux = {
install_info = {
url = "https://github.com/Freed-Wu/tree-sitter-tmux",
files = { "src/parser.c" },
},
maintainers = { "@Freed-Wu" },
}
list.todotxt = {
install_info = {
url = "https://github.com/arnarg/tree-sitter-todotxt.git",

View file

@ -0,0 +1,52 @@
; Comments
(comment) @comment @spell
; General
[
(string)
(raw_string)
] @string
(int) @number
(path) @string.special.path
[
(option)
(variable_name)
] @variable
(command_line_option) @variable.builtin
((option) @variable.builtin
(#not-lua-match? @variable.builtin "^@"))
(command) @keyword
(source_file_directive
(command) @keyword.import)
(attribute) @attribute
(function_name) @function.call
"=" @operator
[
","
":"
] @punctuation.delimiter
[
"#"
"?"
] @punctuation.special
[
"#{"
"}"
"#["
"]"
"["
"{"
] @punctuation.bracket

View file

@ -0,0 +1,5 @@
((shell) @injection.content
(#set! injection.language "bash"))
((comment) @injection.content
(#set! injection.language "comment"))