summaryrefslogtreecommitdiff
path: root/rc/filetype/swift.kak
diff options
context:
space:
mode:
authorJustin Frank <justinpfrank@protonmail.com>2019-03-13 11:15:59 -0700
committerJustin Frank <justinpfrank@protonmail.com>2019-04-08 17:02:44 -0700
commitc3f694a28f2da1454119ff49540377f4370f940d (patch)
tree6a28a27479e9194949f67612e49945f0c9e07a58 /rc/filetype/swift.kak
parent1fab727f2be4be4e4b6e85887c283daf86aef722 (diff)
Modified base files to use modules
Diffstat (limited to 'rc/filetype/swift.kak')
-rw-r--r--rc/filetype/swift.kak8
1 files changed, 8 insertions, 0 deletions
diff --git a/rc/filetype/swift.kak b/rc/filetype/swift.kak
index 1526cadb..4cf71613 100644
--- a/rc/filetype/swift.kak
+++ b/rc/filetype/swift.kak
@@ -2,6 +2,12 @@ hook global BufCreate .*\.(swift) %{
set-option buffer filetype swift
}
+hook -once global BufSetOption filetype=swift %{
+ require-module swift
+}
+
+provide-module swift %{
+
add-highlighter shared/swift regions
add-highlighter shared/swift/code default-region group
add-highlighter shared/swift/string region %{(?<!')"} %{(?<!\\)(\\\\)*"} fill string
@@ -26,3 +32,5 @@ hook -group swift-highlight global WinSetOption filetype=swift %{
add-highlighter window/swift ref swift
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/swift }
}
+
+}