-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Apologies in advance if I get terminology wrong, well outside my wheelhouse.
The (relatively popular?) macOS-native diffing app Kaleidoscope unfortunately registers an LSHandler for .toml files with a UTI that overrides SyntaxHighlight quicklook compatibility.
Once installed:
❯ mdls -name kMDItemContentType a_toml_file.toml
kMDItemContentType = "io.toml"
❯ /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | grep -A10 -B10 'io\.toml'
--------------------------------------------------------------------------------
type id: io.toml (0x2b1bc)
bundle: Kaleidoscope (0x55e8)
uti: io.toml
localizedDescription: "Base" = ?, "en" = ?, "LSDefaultLocalizedValue" = "TOML"
flags: active imported trusted (0000000000000041)
reference URL: https://toml.io/
conforms to: public.plain-text
tags: .ini, .toml, application/toml
SyntaxHighlight only recognises public.toml, so the above modification causes QuickLook to revert to displayin .toml files as plain text (no SyntaxHighlight involvement at all).
Uninstalling Kaleidoscope (v6.4, but presumably also many prior versions)and restarting macOS restores TOML syntax highlighting.
The 'Plain' tab seems to allow associating specific handlers to custom file types, which is exactly what I need to do here, but my understanding is the 'Plain' tab requires the file to have no extension.
Is there a way I can add a io.toml UTI handler as a user?
If not, can this UTI be added as a TOML handler in a future SyntaxHighlight update?
Thanks!