sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for .mojo filename extension

SimplyYummy opened this issue · comments

Thanks for this great and awesome app. Can we get .mojo and .🔥 extensions for mojo files supported?

It isn't currently supported at the moment as its a new language that's a superset of python. Currently there is no preview when using quicklook, which is expected as its a new programming language.

  1. Website for mojo language: https://docs.modular.com/mojo/

  2. Mojo's official syntax highlighting: https://github.com/modularml/mojo-syntax

  3. Converted syntax to tmLanguage if it helps: https://github.com/SimplyYummy/Modular-Mojo-Syntax-Highlighting/blob/main/mojo.syntax.tmLanguage

Running mdls -name kMDItemContentType -name kMDItemContentTypeTree filename.mojo shows the below:

kMDItemContentType     = "com.coteditor.mojo"
kMDItemContentTypeTree = (
    "com.coteditor.mojo",
    "public.source-code",
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)

And the output from Inquiry window in Syntax Highlighter.app:

Screenshot mojo extension