mirror of https://github.com/helix-editor/helix
feat: language support for mail files (#12945)
parent
26cb3c20e7
commit
bb3af143f1
|
@ -134,6 +134,7 @@
|
||||||
| log | ✓ | | | |
|
| log | ✓ | | | |
|
||||||
| lpf | ✓ | | | |
|
| lpf | ✓ | | | |
|
||||||
| lua | ✓ | ✓ | ✓ | `lua-language-server` |
|
| lua | ✓ | ✓ | ✓ | `lua-language-server` |
|
||||||
|
| mail | ✓ | ✓ | | |
|
||||||
| make | ✓ | | ✓ | |
|
| make | ✓ | | ✓ | |
|
||||||
| markdoc | ✓ | | | `markdoc-ls` |
|
| markdoc | ✓ | | | `markdoc-ls` |
|
||||||
| markdown | ✓ | | | `marksman`, `markdown-oxide` |
|
| markdown | ✓ | | | `marksman`, `markdown-oxide` |
|
||||||
|
|
|
@ -1676,6 +1676,16 @@ injection-regex = "tablegen"
|
||||||
name = "tablegen"
|
name = "tablegen"
|
||||||
source = { git = "https://github.com/Flakebi/tree-sitter-tablegen", rev = "3e9c4822ab5cdcccf4f8aa9dcd42117f736d51d9" }
|
source = { git = "https://github.com/Flakebi/tree-sitter-tablegen", rev = "3e9c4822ab5cdcccf4f8aa9dcd42117f736d51d9" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "mail"
|
||||||
|
scope = "text.mail"
|
||||||
|
file-types = ["eml"]
|
||||||
|
injection-regex = "mail|eml|email"
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "mail"
|
||||||
|
source = { git = "https://github.com/ficcdaf/tree-sitter-mail", rev = "8e60f38efbae1cc5f22833ae13c5500dd0f3b12f" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "markdown"
|
name = "markdown"
|
||||||
scope = "source.md"
|
scope = "source.md"
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
; header fields
|
||||||
|
[
|
||||||
|
(header_field_email)
|
||||||
|
(header_field_subject)
|
||||||
|
(header_field)
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
; delimited punctuation
|
||||||
|
(header_separator) @punctuation.delimiter
|
||||||
|
(email_delimiter) @punctuation.delimiter
|
||||||
|
|
||||||
|
; email subject contents
|
||||||
|
(header_subject
|
||||||
|
(subject) @markup.bold)
|
||||||
|
; extra metadata headers
|
||||||
|
(header_other
|
||||||
|
(header_unstructured) @comment)
|
||||||
|
|
||||||
|
; Addressee Name (Firstname, Lastname, etc.)
|
||||||
|
(atom) @variable
|
||||||
|
|
||||||
|
; Email Address
|
||||||
|
(email) @string
|
||||||
|
|
||||||
|
; Quoted Reply
|
||||||
|
(quote_marker) @punctuation.special
|
||||||
|
(quote_contents) @markup.quote
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
(atom_block
|
||||||
|
(atom) @entry.inside) @entry.around
|
||||||
|
|
||||||
|
(email_address) @entry.around
|
||||||
|
(header_other
|
||||||
|
(header_unstructured) @entry.around)
|
||||||
|
|
||||||
|
(quoted_block)+ @comment.around
|
||||||
|
|
||||||
|
(body_block)+ @function.around
|
||||||
|
|
||||||
|
(header_subject
|
||||||
|
(subject) @function.around)
|
Loading…
Reference in New Issue