Skip to content
Discussion options

You must be logged in to vote

injection-regex is for syntax highlighting one language when it’s embedded in another. Like code snippets in Markdown (e.g. the TOML section below), or Markdown-formatted comments in code files.

If the files have no extension, you probably want a glob pattern in file-types.

e.g. if you set mutt’s tmpdraftdir to /tmp/muttdrafts/. Then in your Helix languages.toml:

[[language]]
name = "mail"
file-types = ["mail", "eml", { glob = "/tmp/muttdrafts/*" }]

Any file opened from that location should set the language to mail.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tehabe
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants