SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

How to remove/add support to specific file type in Syntax Highlight?

Open water137780117 opened this issue 3 years ago • 5 comments

In my mac, when Syntax Highlight Extension was disabled, public.unix-executable files were taken over by Apparency.app. Screen Shot 2022-04-07 at 00 35 31 (2) When Syntax Highlight Extension was enabled, although binary files were set to "ignore", Apparency information couldn't be shown anymore. Screen Shot 2022-04-06 at 23 28 54 (2) When binary files were set to "dump", they were quicklooked as hex files. Screen Shot 2022-04-07 at 00 31 10 (2)

In general, is there a way to let Syntax Highlight ignore public.unix-executable files completely? And maybe other file type as well. I tried to delete "public.unix-executable" in "Info.plist" of "Syntax Highlight Quicklook Extension.appex" but it didn't work.

Also, is there a way to add support to specific plain text files with extensions? Maybe just like adding UTI names "dyn.XXXXXXXX" to "Info.plist" inside "QLColorCode.qlgenerator". I tried to add "dyn.XXXXXXXX" to "Info.plist" of "Syntax Highlight Quicklook Extension.appex" but it didn't work.

Thank you very much!

water137780117 avatar Apr 06 '22 16:04 water137780117

As written in the FAQ it is not possible to enable / disable support for single formats and not even dynamically associate new formats (for files with an extension).

Disabling binary file support simply does not generate the preview but the files are still handled. There is no way to set at runtime which formats to manage and which ones to be managed by other generators.

Editing the Info.plist file also causes corruption of the application signature and consequently stops working.

In System Preferences / Extensions / Quicklook, drag Apparency to the top to give it higher priority and maybe it will be used instead of SyntaxHighlight.

sbarex avatar Apr 06 '22 17:04 sbarex

Thanks for your reply. I have drag Apparency to the top, but public.unix-executable files are still handled by SyntaxHighlight.

water137780117 avatar Apr 07 '22 05:04 water137780117

have you tried to restart? otherwise I have no ideas :man_shrugging:

sbarex avatar Apr 07 '22 05:04 sbarex

have you tried to restart? otherwise I have no ideas 🤷‍♂️

Unfortunately, it still doesn't work... I'm confused of the priority rule. Why does SyntaxHightlight always have higher priority than Apparency? 😂

water137780117 avatar Apr 07 '22 06:04 water137780117

I'm afraid only Apple knows ...

sbarex avatar Apr 07 '22 07:04 sbarex