Skip to content

Commit

Permalink
Add missing QLSupportedContentTypes, document adding it
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Jul 11, 2024
1 parent 756c53c commit 443b6f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Edit/Chime.docc/AddLanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
9 changes: 8 additions & 1 deletion Preview/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
<false/>
<key>QLSupportedContentTypes</key>
<array>
<string>public.swift-source</string>
<string>org.clojure.source</string>
<string>org.elixir-lang.source</string>
<string>dev.go.go-source</string>
<string>org.golang.go-script</string>
<string>dev.go.go-module</string>
<string>dev.go.go-work</string>
<string>dev.go.go-sum</string>
<string>org.ocaml.ocaml</string>
<string>org.ocaml.ocaml-interface</string>
<string>public.python-script</string>
<string>public.swift-source</string>
</array>
<key>QLSupportsSearchableItems</key>
<false/>
Expand Down

0 comments on commit 443b6f3

Please sign in to comment.