sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
3.02k stars 72 forks source link

.txt file preview not working on macOS Monterey #139

Closed ph0ngp closed 2 years ago

ph0ngp commented 2 years ago

The app is working great with all other supported file types, but when I preview .txt or .text files, I still see the native Quick Look interface popping up. I am using macOS Monterey 12.1

sbarex commented 2 years ago

I think Apple has added the .txt format among those that cannot be handled.

StanleyCruvinel commented 2 years ago

Hi Syntax Highlight is best! Thanks so much.

How can'I fix ?

$ mdls -name kMDItemContentType -name kMDItemContentTypeTree test.txt
kMDItemContentType     = "public.plain-text"
kMDItemContentTypeTree = (
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)
sbarex commented 2 years ago

Unfortunately, nothing can be done. The application is already configured to manage the public.plain-text format. But the operating system does not allow you to customize the preview of .txt files.

StanleyCruvinel commented 2 years ago

thanks for the answer. Maybe in the next MacOS update apple allow that. 👍 @sbarex

bvandergiessen commented 2 years ago

Ah, that explains it, thanks. I was trying all kinds of tricks to get it right, but it's simply impossible. Perhaps you could update the Readme.md, section "File format management".