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

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

Closed
gardiner opened this issue Oct 8, 2023 · 3 comments

Comments

@gardiner
Copy link

gardiner commented Oct 8, 2023

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
Copy link
Owner

chamburr commented Oct 8, 2023

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.

@chamburr chamburr closed this as completed Oct 9, 2023
@gardiner
Copy link
Author

gardiner commented Oct 9, 2023

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
Copy link
Owner

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?

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