SourceCodeSyntaxHighlight
SourceCodeSyntaxHighlight copied to clipboard
Unable to add a plain file extension .theme as PHP
I'm trying to add the .theme extension to render as PHP but can't get it to work. I've tried a number of file name patterns with and without using regular expression with no luck. The "Inquiry file" tool returns it as unsupported, see the attached screenshot. Is there any way I can add this type? Thank you.
It is not possible to dynamically add a custom format. You can only customize plain file WITHOUT extension. Otherwise, for all files with an extension it is necessary to enable its support at the compile time of the application.
.theme extension is very common, for example it is used for application themes which are written in lua format. So it is probably not appropriate to associate this extension with some language.
Got it, I misunderstood the function here. I agree with not associating it with a particular language. Is there any way to define it to render as plain text somehow so you can at least preview it?
My use-case is to view *.code-workspace files as JSON. I think matching regex only for files without extension is a bit limiting!
sorry but this is a limitation/features os macOS. Every file extension generate diffent UTIs anche each UTIs must be handled at the compiling time to be supported...