SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

Add support for .mojo filename extension

Open Railfree opened this issue 2 years ago • 1 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

Railfree avatar Sep 19 '23 00:09 Railfree

Sorry, but mojo is not handled by the rendering engine Highlight, that is not compatible with the tmLanguage format.

sbarex avatar Jun 04 '24 11:06 sbarex