Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf8 makefile etc. #1

Open
grylem opened this issue Mar 12, 2018 · 11 comments
Open

utf8 makefile etc. #1

grylem opened this issue Mar 12, 2018 · 11 comments

Comments

@grylem
Copy link

grylem commented Mar 12, 2018

Firstly - Thank for the nice plugin.
For Makefile(without extension) no highlight, for Makefile.mk etc. - all ok.
Cuesheet:
if *.cue not utf8 encoding QLSyntaxHighlight show blank window, convert *.cue to utf8 and QLSyntaxHighlight show *.cue with syntax highlight

@brinsche
Copy link
Owner

Thanks! I released a new version which tries to read all files as utf8 with https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy , this is obviously not a very good solution, but might be better than nothing for now, detecting the real encoding and converting is a nontrivial task but I'll try to find a solution.

I use https://docs.rs/syntect/2.0.0/syntect/parsing/struct.SyntaxSet.html#method.find_syntax_for_file for finding the syntax for a file so I'd have to hardcode support for makefiles :/

@grylem
Copy link
Author

grylem commented Mar 14, 2018

Thanks. New versions works fine for non utf8 files.
About makefile:
I have installed syntax for makefile and if makefile have extension like *.mk QLSyntaxHighlight works fine. If Makefile dont have extension QLSyntaxHighlight show content of Makefile without highlighting.
I think it's because quicklook dont use filename and can not choose the right syntax in this case.

@brinsche
Copy link
Owner

I released a new version that should fix it, Makefiles should work without needing a custom syntax already

@grylem
Copy link
Author

grylem commented Mar 14, 2018

Thanks! Now all works fine.
Its possible to add highlighting for binary plist?

@brinsche
Copy link
Owner

Do you really mean .plist files when they are saved in binary or the xml version? the xml version should work with v0.5.1 now.

@grylem
Copy link
Author

grylem commented Mar 15, 2018

Saved in binary, for xml highlight works good
P.S.
Its possible to add show binary file as hex?.

@brinsche
Copy link
Owner

Hm, I'll see what I can do but that's not as easy as the other feature requests

@grylem
Copy link
Author

grylem commented Mar 16, 2018

I previously used qlcolorcode for plist(include binary saved),xml, bash(.etc) and source code.tauQL for "public.data" and plain-text.
Now QLSyntaxHighlight can replace both(tauQL and QLColorCode) for me and it's great. For complete happiness there are not enough pairs of things - highlighting binary plist, and if file binary show it like hexfiend etc.
Anyway now for me QLSyntaxHighlight very very good. Thank you for making it.

@brinsche
Copy link
Owner

hex view for binaries is implemented now, I'll look into binary plists next

@brinsche
Copy link
Owner

brinsche commented Apr 1, 2018

Binary plists should work now too!

@grylem
Copy link
Author

grylem commented Apr 1, 2018

Thanks!
a few comments : for binary plist work fine, about hex, if mach-o binary(public.unix-exucatable) does not have exec permissions QLSyntaxHighlight dont show as hex. If mach-o binary has exec permissions but file name contains "dot" QLSyntaxHighlight perceives like extensions and dont show hex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants