diff options
| author | John Isom <John.Isom2001@gmail.com> | 2020-08-01 09:24:06 -0600 |
|---|---|---|
| committer | John Isom <John.Isom2001@gmail.com> | 2020-08-01 09:24:06 -0600 |
| commit | 79fa50dc3e47c1be95ecde34e70a3bc0c73f4c26 (patch) | |
| tree | a203f5dd92c0c3242178e8608274490081dde04e | |
| parent | e3f3297334370a1398b4f78518326bb46473c464 (diff) | |
Add namespacing to crystal hooks
| -rw-r--r-- | rc/filetype/crystal.kak | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rc/filetype/crystal.kak b/rc/filetype/crystal.kak index ae1ce819..b57f1518 100644 --- a/rc/filetype/crystal.kak +++ b/rc/filetype/crystal.kak @@ -7,12 +7,15 @@ hook global BufCreate '.*\.cr' %{ hook global WinSetOption filetype=crystal %{ require-module crystal - evaluate-commands set-option window static_words %opt{crystal_keywords} %opt{crystal_attributes} %opt{crystal_objects} + add-highlighter window/crystal ref crystal - hook -group crystal window InsertChar '\n' crystal-new-line-inserted + evaluate-commands set-option window static_words %opt{crystal_keywords} %opt{crystal_attributes} %opt{crystal_objects} + + hook window InsertChar '\n' -group crystal-indent crystal-new-line-inserted + hook -always -once window WinSetOption filetype=.* %{ remove-highlighter window/crystal - remove-hooks window crystal + remove-hooks window crystal-.+ } } |
