chamburr / glance

🔎 All-in-one Quick Look plugin
MIT License
427 stars 16 forks source link

Support PUG files (plain text/source code files in the PUG template format) #34

Closed gardiner closed 1 year ago

gardiner commented 1 year ago

Glance currently does not provide a preview for PUG files (see https://pugjs.org/api/getting-started.html for details). This is the UTI:

kMDItemContentType = "dyn.ah62d4rv4ge81a7ph"

I would gladly provide a pull request, but I have no idea how to setup the build environment to build and test the change. If you could give me some pointers on how to setup the dev environment, I could also write up a DEVELOPMENT.md file for other contributors.

Anyway, thanks for your great work, it is much appreciated!

Best, Ole.

chamburr commented 1 year ago

Hi Ole, there are some instructions in README.md about adding new file types. Building should just be opening the project in Xcode, updating the code signing configurations and clicking the build button.

Unfortunately in this case, it seems that the library we use for highlighting, Chroma, does not support PUG syntax. This means we can't support PUG too.

gardiner commented 1 year ago

Hi chamburr, thanks for responding so quickly. You are right, it was just as easy as downloading xcode, opening the project , adjusting the config and rebuilding. And although pug is not supported by the source code highlighting lib you're using it is still very helpful for me to be able to quicklook pug files. So if you are interested in a pull request for pug files (without color coding), just let me know. Anyway, thanks again, all the best – Ole.

chamburr commented 1 year ago

Given that every other source code file has syntax highlighting support, I don't really want to add pug files without syntax highlighting. Maybe you could look into adding or requesting pug support from the upstream library?