whomwah / qlstephen

A QuickLook plugin that lets you view plain text files without a file extension
https://github.com/whomwah/qlstephen
MIT License
2.76k stars 161 forks source link

Blank preview on M1 #133

Open manuelgrabowski opened 2 years ago

manuelgrabowski commented 2 years ago

I'm afraid the plugin doesn't work on my M1, while the same file/version works fine on my Intel Mac. Judging by the comments in https://github.com/sindresorhus/quick-look-plugins/issues/126 I'm guessing this is an M1 issue, but I'm happy to provide any additional debug information to narrow it down further.

image

philfreo commented 2 years ago

I have a new M1 Mac I'm trying to setup qlstephen on. I'm unable to get it working at all, even after following all the same steps as in https://github.com/whomwah/qlstephen/issues/87#issuecomment-590572347. I don't have the blank screen issue, I have the ql plugin taking no effect whatsoever. Is Rosetta required? (I don't have that installed currently)

SConaway commented 2 years ago

yes, as of now, it's compiled only for x86_64, so Rosetta is needed.

SConaway commented 2 years ago

and it seems like running make && make install in the repo (after cloning) compiles it for arm64 as well

grischard commented 2 years ago

For those too lazy to recompile, here's a fresh build: QLStephen.qlgenerator.zip

philfreo commented 2 years ago

Is it possible to get the homebrew version updated for M1 as well?

SConaway commented 2 years ago

As far as I know, brew doesn't accept forks officially. I'm not sure what's happening with this repo...

bengry commented 2 years ago

For those too lazy to recompile, here's a fresh build: QLStephen.qlgenerator.zip

Does this fix the empty quicklook previews for you? I tried replacing the file I had in ~/Library/QuickLook and they still don't work, even after a restart. I should note I'm getting the same empty preview even using my own compiled version (compiled on an M1 using the instructions in the README).

davidjdixon commented 2 years ago

For those too lazy to recompile, here's a fresh build: QLStephen.qlgenerator.zip

Does this fix the empty quicklook previews for you? I tried replacing the file I had in ~/Library/QuickLook and they still don't work, even after a restart. I should note I'm getting the same empty preview even using my own compiled version (compiled on an M1 using the instructions in the README).

I can confirm that this update does fix the issue I was seeing. But to clarify, my issue wasn't an empty preview, just no preview at all, so I would initially check if the file has the quarantine attributes.

Unfortunately, it seems whatever version of the binary that homebrew is using is still not arm compatible (as the original version was only installed yesterday during a system rebuild).

brettrowberry commented 2 years ago

Looking forward to this on M1 Homebrew as well!

justinormont commented 2 years ago

For those too lazy to recompile, here's a fresh build: QLStephen.qlgenerator.zip

Neither the arm build by bengry, nor removing the quarantine flag (xattr -r -d com.apple.quarantine ~/Library/QuickLook) helped. Restarting quicklook (qlmanage -r) and Finder (killall Finder) also did not help.

Any other ideas to fix the blank preview?

justinormont commented 2 years ago

This Quick Look plugin works well, and is kept up to date -- https://github.com/sbarex/SourceCodeSyntaxHighlight

Can either download from the releases, or use Homebrew brew install --cask --no-quarantine syntax-highlight.

MarkBTomlinson commented 1 year ago

This Quick Look plugin works well, and is kept up to date -- https://github.com/sbarex/SourceCodeSyntaxHighlight

Can either download from the releases, or use Homebrew brew install --cask --no-quarantine syntax-highlight.

Thanks for this the other solutions got me nowhere.