summaryrefslogtreecommitdiff
path: root/rc/filetype/scala.kak
diff options
context:
space:
mode:
authorJustin Frank <justinpfrank@protonmail.com>2019-04-10 16:48:46 -0700
committerJustin Frank <justinpfrank@protonmail.com>2019-04-10 16:48:46 -0700
commite959b99050492e820e2cf39154b87e5f4696defa (patch)
tree4c656d4eab9f3a82a3ca31f2ec387e19fe0a1a96 /rc/filetype/scala.kak
parent80ac46e09de0a30c0bf590fd50b6cbf9bfd1c41b (diff)
Fixed several more support files.
Diffstat (limited to 'rc/filetype/scala.kak')
-rw-r--r--rc/filetype/scala.kak35
1 files changed, 17 insertions, 18 deletions
diff --git a/rc/filetype/scala.kak b/rc/filetype/scala.kak
index ce890058..73f086b5 100644
--- a/rc/filetype/scala.kak
+++ b/rc/filetype/scala.kak
@@ -8,11 +8,26 @@ hook global BufCreate .*[.](scala) %{
set-option buffer filetype scala
}
-hook -once global BufSetOption filetype=scala %{
+# Initialization
+# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+
+hook global WinSetOption filetype=scala %[
require-module scala
+
+ hook window ModeChange insert:.* -group scala-trim-indent scala-trim-indent
+ hook window InsertChar \n -group scala-indent scala-indent-on-new-line
+ hook window InsertChar \} -group scala-indent scala-indent-on-closing-curly-brace
+
+ hook -once -always window WinSetOption filetype=.* %{ remove-hooks window scala-.+ }
+]
+
+hook -group scala-highlight global WinSetOption filetype=scala %{
+ add-highlighter window/scala ref scala
+ hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/scala }
}
-provide-module scala %{
+
+provide-module scala %[
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
@@ -64,20 +79,4 @@ define-command -hidden scala-indent-on-closing-curly-brace %[
]
]
-# Initialization
-# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
-
-hook -group scala-highlight global WinSetOption filetype=scala %{
- add-highlighter window/scala ref scala
- hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/scala }
-}
-
-hook global WinSetOption filetype=scala %[
- hook window ModeChange insert:.* -group scala-trim-indent scala-trim-indent
- hook window InsertChar \n -group scala-indent scala-indent-on-new-line
- hook window InsertChar \} -group scala-indent scala-indent-on-closing-curly-brace
-
- hook -once -always window WinSetOption filetype=.* %{ remove-hooks window scala-.+ }
]
-
-}