I’m creating a file template for a file with an extension that Xcode doesn’t recognise. Xcode doesn’t apply syntax highlighting to the file but I’d like it to. I would like Xcode to recognise the file as com.netscape.javascript-source
even though the file extension isn’t .js
(the file is actually jsonnet). I tried setting the AllowedTypes
property of the TemplateInfo.plist
to the UTI of JavaScript but that had no effect.
Alternatively, is it possible to define a new file extension for an existing UTI?