mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-10 23:40:04 -04:00
feat: add the muttrc parser
This commit is contained in:
parent
69e4b99f13
commit
e4a1cc6e8e
5 changed files with 74 additions and 0 deletions
|
|
@ -308,6 +308,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [ ] [mermaid](https://github.com/monaqa/tree-sitter-mermaid) (experimental)
|
- [ ] [mermaid](https://github.com/monaqa/tree-sitter-mermaid) (experimental)
|
||||||
- [x] [meson](https://github.com/Decodetalkers/tree-sitter-meson) (maintained by @Decodetalkers)
|
- [x] [meson](https://github.com/Decodetalkers/tree-sitter-meson) (maintained by @Decodetalkers)
|
||||||
- [x] [mlir](https://github.com/artagnon/tree-sitter-mlir) (experimental, maintained by @artagnon)
|
- [x] [mlir](https://github.com/artagnon/tree-sitter-mlir) (experimental, maintained by @artagnon)
|
||||||
|
- [x] [muttrc](https://github.com/neomutt/tree-sitter-muttrc) (maintained by @Freed-Wu)
|
||||||
- [x] [nasm](https://github.com/naclsn/tree-sitter-nasm) (maintained by @ObserverOfTime)
|
- [x] [nasm](https://github.com/naclsn/tree-sitter-nasm) (maintained by @ObserverOfTime)
|
||||||
- [ ] [nickel](https://github.com/nickel-lang/tree-sitter-nickel)
|
- [ ] [nickel](https://github.com/nickel-lang/tree-sitter-nickel)
|
||||||
- [x] [nim](https://github.com/alaviss/tree-sitter-nim) (maintained by @aMOPel)
|
- [x] [nim](https://github.com/alaviss/tree-sitter-nim) (maintained by @aMOPel)
|
||||||
|
|
|
||||||
|
|
@ -404,6 +404,9 @@
|
||||||
"mlir": {
|
"mlir": {
|
||||||
"revision": "650a8fb72013ba8d169bdb458e480d640fc545c9"
|
"revision": "650a8fb72013ba8d169bdb458e480d640fc545c9"
|
||||||
},
|
},
|
||||||
|
"muttrc": {
|
||||||
|
"revision": "9d4e1774e754f55a867638ab6a81335cf1078c23"
|
||||||
|
},
|
||||||
"nasm": {
|
"nasm": {
|
||||||
"revision": "3bc691d2cfba44bea339a775ad496c8bc552c60d"
|
"revision": "3bc691d2cfba44bea339a775ad496c8bc552c60d"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ for ft, lang in pairs {
|
||||||
xsd = "xml",
|
xsd = "xml",
|
||||||
xslt = "xml",
|
xslt = "xml",
|
||||||
sbt = "scala",
|
sbt = "scala",
|
||||||
|
neomuttrc = "muttrc",
|
||||||
} do
|
} do
|
||||||
register_lang(lang, ft)
|
register_lang(lang, ft)
|
||||||
end
|
end
|
||||||
|
|
@ -1212,6 +1213,14 @@ list.mlir = {
|
||||||
maintainers = { "@artagnon" },
|
maintainers = { "@artagnon" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.muttrc = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/neomutt/tree-sitter-muttrc",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@Freed-Wu" },
|
||||||
|
}
|
||||||
|
|
||||||
list.nasm = {
|
list.nasm = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/naclsn/tree-sitter-nasm",
|
url = "https://github.com/naclsn/tree-sitter-nasm",
|
||||||
|
|
|
||||||
53
queries/muttrc/highlights.scm
Normal file
53
queries/muttrc/highlights.scm
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
; Comments
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
; General
|
||||||
|
(int) @number
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
[
|
||||||
|
(map)
|
||||||
|
(object)
|
||||||
|
(composeobject)
|
||||||
|
(color)
|
||||||
|
(attribute)
|
||||||
|
] @string.special
|
||||||
|
|
||||||
|
(quadoption) @boolean
|
||||||
|
|
||||||
|
(path) @string.special.path
|
||||||
|
|
||||||
|
(regex) @string.regexp
|
||||||
|
|
||||||
|
[
|
||||||
|
(option)
|
||||||
|
(command_line_option)
|
||||||
|
] @variable.builtin
|
||||||
|
|
||||||
|
(command) @keyword
|
||||||
|
|
||||||
|
(source_directive
|
||||||
|
(command) @keyword.import)
|
||||||
|
|
||||||
|
(uri) @string.special.url
|
||||||
|
|
||||||
|
(key_name) @constant.builtin
|
||||||
|
|
||||||
|
(escape) @string.escape
|
||||||
|
|
||||||
|
(function) @function.call
|
||||||
|
|
||||||
|
; Literals
|
||||||
|
[
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
"," @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"&"
|
||||||
|
"?"
|
||||||
|
"*"
|
||||||
|
] @character.special
|
||||||
8
queries/muttrc/injections.scm
Normal file
8
queries/muttrc/injections.scm
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
((regex) @injection.content
|
||||||
|
(#set! injection.language "regex"))
|
||||||
|
|
||||||
|
((shell) @injection.content
|
||||||
|
(#set! injection.language "bash"))
|
||||||
|
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue