diff options
| author | Justin Frank <justinpfrank@protonmail.com> | 2019-04-09 20:54:19 -0700 |
|---|---|---|
| committer | Justin Frank <justinpfrank@protonmail.com> | 2019-04-09 20:54:19 -0700 |
| commit | 80ac46e09de0a30c0bf590fd50b6cbf9bfd1c41b (patch) | |
| tree | d4abde4c341a026d56512d74f79608d6a45ec85a /rc/filetype/pug.kak | |
| parent | 887a5223ac8e71ca6d7f0cd9c764d68ce3d90dbe (diff) | |
Fixed many of the filetype support modules to not use `BufSetOption` to load
Diffstat (limited to 'rc/filetype/pug.kak')
| -rw-r--r-- | rc/filetype/pug.kak | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/rc/filetype/pug.kak b/rc/filetype/pug.kak index 121b0b37..c4a30511 100644 --- a/rc/filetype/pug.kak +++ b/rc/filetype/pug.kak @@ -12,10 +12,24 @@ hook global BufCreate .*[.](pug|jade) %{ set-option buffer filetype pug } -hook -once global BufSetOption filetype=pug %{ +# Initialization +# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + +hook global WinSetOption filetype=pug %{ require-module pug + + hook window ModeChange insert:.* -group pug-trim-indent pug-trim-indent + hook window InsertChar \n -group pug-indent pug-indent-on-new-line + + hook -once -always window WinSetOption filetype=.* %{ remove-hooks window pug-.+ } } +hook -group pug-highlight global WinSetOption filetype=pug %{ + add-highlighter window/pug ref pug + hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/pug } +} + + provide-module pug %{ # Highlighters @@ -64,19 +78,4 @@ define-command -hidden pug-indent-on-new-line %{ } } -# Initialization -# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -hook -group pug-highlight global WinSetOption filetype=pug %{ - add-highlighter window/pug ref pug - hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/pug } -} - -hook global WinSetOption filetype=pug %{ - hook window ModeChange insert:.* -group pug-trim-indent pug-trim-indent - hook window InsertChar \n -group pug-indent pug-indent-on-new-line - - hook -once -always window WinSetOption filetype=.* %{ remove-hooks window pug-.+ } -} - } |
