brentdax/SyntaxKit — pull request #1 by brentdax (2013-08-03 05:27:03+00:00)
Title: Better UTI-to-syntax mapping, user and app syntax definitions

This branch implements five changes:

1. SyntaxKit's bundle ID is now "com.architechies.frameworks.SyntaxKit". The "frameworks" part was missing before.
2. Syntax definitions now have a .syntaxDefinition extension and belong to the UTI com.architechies.frameworks.SyntaxKit.syntaxDefinition.
3. Syntax definitions have two new fields: PreferredUTIs and CompatibleUTIs. The former specifies file types the syntax is intended to mark; the latter specifies types the syntax can mark if there's nothing better available. The old FileNameSuffixes field, which was unused by SyntaxKit and was intended for the same purpose, has been removed.
4. Thanks to these features, SyntaxKit can now load syntaxes included in an app bundle or the user's `~/Library/Application Support/Syntax Definitions` folder (or a sandboxed equivalent). A preferred syntax will always beat a compatible syntax, but if there's a tie, user syntaxes will be preferred over app syntaxes, and app syntaxes will be preferred over SyntaxKit syntaxes.
5. SyntaxKit will monitor the user syntax definitions folder using [ArchDirectoryObserver](https://github.com/brentdax/ArchDirectoryObserver) (which is based on FSEvents) and automatically reload syntaxes if another app makes changes.