Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

TOML files not previewed: public.toml UTI is never declared

Open Beginner friendly
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift
Domain
desktop

Research direction

Start by reading Pique's app Info.plist and find its existing UTExportedTypeDeclarations for other file formats. Add a TOML declaration matching the suggested type identifier, plain-text conformance, and filename extension; then check the built app's Info.plist and confirm macOS resolves a .toml file to public.toml and Quick Look previews it.

Written by the indexing model from the issue text.

Description

Problem

.toml files are not previewed by Pique on macOS 26.6 (Apple silicon), even though the README lists TOML as supported and the extension is registered and enabled. JSON and Python previews work fine. This may be what #25 ran into.

Cause

PiquePreview's QLSupportedContentTypes lists public.toml, but nothing on a stock macOS install declares that UTI, and Pique's own Info.plist doesn't declare it either (it only exports/imports types such as PowerShell, TypeScript, AsciiDoc, NDJSON). So .toml files get a dynamic UTI:

$ mdls -name kMDItemContentType file.toml
kMDItemContentType = "dyn.ah62d4rv4ge81k55rru"

Quick Look matches on the content type, so the extension is never offered the file. QLFileExtensions contains toml, but that didn't help in my case. Having VS Code installed doesn't help either, since it doesn't declare a TOML UTI.

Workaround

A tiny stub app that exports public.toml (conforming to public.plain-text, extension toml), registered with lsregister -f, followed by qlmanage -r && qlmanage -r cache. After that:

$ mdls -name kMDItemContentType file.toml
kMDItemContentType = "public.toml"

and Pique previews .toml files correctly.

Suggested fix

Add an exported type declaration to Pique's app Info.plist (UTExportedTypeDeclarations), as is already done for the other formats:

<dict>
  <key>UTTypeIdentifier</key><string>public.toml</string>
  <key>UTTypeDescription</key><string>TOML</string>
  <key>UTTypeConformsTo</key><array><string>public.plain-text</string></array>
  <key>UTTypeTagSpecification</key>
  <dict>
    <key>public.filename-extension</key><array><string>toml</string></array>
  </dict>
</dict>

(Using UTImportedTypeDeclarations is also an option if you'd rather not claim ownership of the identifier. Other candidates may have the same problem, e.g. .lock, .env, .conf, and .hcl; it's worth checking which of the listed extensions resolve to a dynamic UTI on a clean install.)

Dominant language
Swift
Stars
197
Forks
10
Avg merge
18m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from macadmins/pique

All issues in macadmins/pique

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.