Skip to content

Add Swift syntax highlighting for Colorer plugin#3217

Merged
elfmz merged 1 commit into
elfmz:masterfrom
kuzmeech:feature/swift-syntax-highlighting
Jan 31, 2026
Merged

Add Swift syntax highlighting for Colorer plugin#3217
elfmz merged 1 commit into
elfmz:masterfrom
kuzmeech:feature/swift-syntax-highlighting

Conversation

@kuzmeech

Copy link
Copy Markdown
Contributor

Summary

Add Swift programming language syntax highlighting to the Colorer plugin.

Changes

  • Add swift.hrc - Swift syntax highlighting rules
  • Update proto.hrc - Add .swift extension mapping

Features

  • Keywords: declarations, statements, expressions, concurrency
  • String literals: regular, multiline, raw, interpolated
  • Comments: line, block, documentation
  • Attributes: @available, @main, @MainActor, etc.
  • Compiler directives: #if, #available, #file, etc.
  • Numbers: decimal, binary, octal, hex, float
  • Common types: Int, String, Array, etc.
  • Outlining: functions (func), initializers (init, deinit)

Related

Adds comprehensive Swift language support including:
- Declaration keywords (class, struct, enum, protocol, actor, func, var, let)
- Statement keywords (if, guard, switch, for, while, do, try, catch, throw)
- Modifiers (async, await, weak, lazy, mutating, override, etc.)
- Attributes (@mainactor, @objc, @available, @propertyWrapper, etc.)
- Compiler directives (#if, #available, #selector, #file, etc.)
- String interpolation \(...)
- Raw strings #"..."# and multiline strings """..."""
- Common Swift types (Int, String, Array, Optional, Result, etc.)
- Function/init/deinit outlining support
@elfmz elfmz merged commit 7e93fb1 into elfmz:master Jan 31, 2026
2 checks passed
stpork pushed a commit to stpork/far2l-adb that referenced this pull request May 2, 2026
…lighting

Add Swift syntax highlighting for Colorer plugin
stpork pushed a commit to stpork/far2l-adb that referenced this pull request May 3, 2026
…lighting

Add Swift syntax highlighting for Colorer plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants