TooMuchTheme

1.0.0

tmTheme (TextMate syntax highlighting theme) support library for Swift
ThatsJustCheesy/TooMuchTheme

What's New

v1.0.0

2021-08-27T03:38:27Z

TooMuchTheme

tmTheme support library for Swift

Includes:

  • Theme type
    • Codable to/from tmTheme format
    • Generate NSAttributedString attributes from a given Theme and Scope or Context
  • ScopeSelector type
    • Codable to/from string format
    • Scope and Context matching
    • Fully compatible with TextMate 2 format
  • Scope and Context types
    • A Scope is a list of scope names which emulates a TextMate scope (grammar derivation)
      • Codable to/from space-separated scope names string
      • Direct (matchAndRemoveFirst) and transient (matchAndRemoveLeading) scope name matching
    • A Context models a text editing selection, and is either
      • A Scope (main), or
      • A pair of Scopes, one to the left of the text cursor (left) and one to the right (main)
  • ScopeName type
    • Codable to/from dot-separated components string
    • Prefix matching

For example usage:

  • of scopes and scope selectors, please see this package's test files
  • of themes and string attribute generation, please see this file

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Sun Mar 17 2024 14:59:59 GMT-0900 (Hawaii-Aleutian Daylight Time)