summaryrefslogtreecommitdiff
path: root/rc/filetype/coffee.kak
diff options
context:
space:
mode:
authorJustin Frank <justinpfrank@protonmail.com>2019-04-11 15:54:58 -0700
committerJustin Frank <justinpfrank@protonmail.com>2019-04-11 15:54:58 -0700
commit6512eafa6006976bd65336ab94d6f1ebd54022e4 (patch)
treed3c11193a4166f41537b1182cb797d2460028774 /rc/filetype/coffee.kak
parentc2b32ebaa77aed64a0b27d199e4f3dd5907014c6 (diff)
Update remaining files to new provide/require format
Diffstat (limited to 'rc/filetype/coffee.kak')
-rw-r--r--rc/filetype/coffee.kak31
1 files changed, 15 insertions, 16 deletions
diff --git a/rc/filetype/coffee.kak b/rc/filetype/coffee.kak
index f0b5ac58..a4b2fab6 100644
--- a/rc/filetype/coffee.kak
+++ b/rc/filetype/coffee.kak
@@ -8,10 +8,24 @@ hook global BufCreate .*[.](coffee) %{
set-option buffer filetype coffee
}
-hook -once global BufSetOption filetype=coffee %{
+# Initialization
+# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+
+hook global WinSetOption filetype=coffee %{
require-module coffee
+
+ hook window ModeChange insert:.* -group coffee-trim-indent coffee-trim-indent
+ hook window InsertChar \n -group coffee-indent coffee-indent-on-new-line
+
+ hook -once -always window WinSetOption filetype=.* %{ remove-hooks window coffee-.+ }
}
+hook -group coffee-highlight global WinSetOption filetype=coffee %{
+ add-highlighter window/coffee ref coffee
+ hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/coffee }
+}
+
+
provide-module coffee %[
# Highlighters
@@ -69,19 +83,4 @@ define-command -hidden coffee-indent-on-new-line %{
}
}
-# Initialization
-# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
-
-hook -group coffee-highlight global WinSetOption filetype=coffee %{
- add-highlighter window/coffee ref coffee
- hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/coffee }
-}
-
-hook global WinSetOption filetype=coffee %{
- hook window ModeChange insert:.* -group coffee-trim-indent coffee-trim-indent
- hook window InsertChar \n -group coffee-indent coffee-indent-on-new-line
-
- hook -once -always window WinSetOption filetype=.* %{ remove-hooks window coffee-.+ }
-}
-
]