Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thatsjustcheesy/toomuchtheme
tmTheme (TextMate syntax highlighting theme) support library for Swift
https://github.com/thatsjustcheesy/toomuchtheme
Last synced: about 2 months ago
JSON representation
tmTheme (TextMate syntax highlighting theme) support library for Swift
- Host: GitHub
- URL: https://github.com/thatsjustcheesy/toomuchtheme
- Owner: ThatsJustCheesy
- Created: 2021-08-06T03:45:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T05:21:03.000Z (over 2 years ago)
- Last Synced: 2024-10-29T23:12:37.052Z (2 months ago)
- Language: Swift
- Homepage:
- Size: 37.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 transitive (`matchAndRemoveLeading`) scope name matching
- A `Context` models a text editing selection, and is either
- A `Scope` (`main`), or
- A pair of `Scope`s, 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 matchingFor example usage:
- of scopes and scope selectors, please see this package's test files
- of themes and string attribute generation, please see [this file](https://github.com/BushelScript/BushelScript/blob/3327cd9e89a58c5e2b7bbbe166496107c71e576c/BushelScript%20Editor/BushelScript%20Editor/Preferences/HighlightStyles.swift)