From 443b6f362f017d77e7be7e668b9451d8563c6fb6 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Thu, 11 Jul 2024 08:19:18 -0400 Subject: [PATCH] Add missing QLSupportedContentTypes, document adding it --- Edit/Chime.docc/AddLanguage.md | 1 + Preview/Info.plist | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Edit/Chime.docc/AddLanguage.md b/Edit/Chime.docc/AddLanguage.md index 44e930d..c0e5fb4 100644 --- a/Edit/Chime.docc/AddLanguage.md +++ b/Edit/Chime.docc/AddLanguage.md @@ -27,6 +27,7 @@ The easiest path to supporting the language syntax is to use Chime's tree-sitter - Include the library module name in `NonSwiftWorkaround.xcconfig` to address an Xcode bug - Add new static property to `LanguageProfile` for the language - Match the language UTI and return it in `LanguageProfile.profile(for:)` +- Add the language UTI to Preview > Info.plist > `NSExtension` > `NSExtensionAttributes` > `QLSupportedContentTypes` Chime also needs to locate the correct tree-sitter query definitions to perform highlighting and embedded language detection. This will be done automatically if the parser SPM package includes queries. diff --git a/Preview/Info.plist b/Preview/Info.plist index 9519d90..810b901 100644 --- a/Preview/Info.plist +++ b/Preview/Info.plist @@ -10,10 +10,17 @@ QLSupportedContentTypes - public.swift-source + org.clojure.source + org.elixir-lang.source dev.go.go-source org.golang.go-script + dev.go.go-module + dev.go.go-work + dev.go.go-sum + org.ocaml.ocaml + org.ocaml.ocaml-interface public.python-script + public.swift-source QLSupportsSearchableItems