Add to tree-sitter config:
{
'nvim-treesitter/nvim-treesitter',
-- ...
dependencies = {
'stevenxxiu/tree-sitter-mail',
},
-- ...
}
To parse the body, in e.g. Markdown, add to ~/.config/nvim/after/queries/mail/injections.scm
:
((body) @injection.content
(#set! injection.language "markdown"))