hook global BufCreate .*\.(swift) %{ set-option buffer filetype swift } hook global WinSetOption filetype=swift %{ require-module swift } hook -group swift-highlight global WinSetOption filetype=swift %{ add-highlighter window/swift ref swift hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/swift } } provide-module swift %{ add-highlighter shared/swift regions add-highlighter shared/swift/code default-region group add-highlighter shared/swift/string region %{(?