This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/kak/hooks.kak

35 lines
690 B
Plaintext

# {{@@ header() @@}}
hook global NormalIdle .* %{ try %{
git show-diff
palette-status
} }
hook global BufOpenFile .* %{
modeline-parse
lsp-enable
}
#completion with tab
hook global InsertCompletionShow .* %{ try %{
execute-keys -draft 'h<a-K>\h<ret>'
map window insert <tab> <c-n>
map window insert <s-tab> <c-p>
} }
hook global InsertCompletionHide .* %{
unmap window insert <tab> <c-n>
unmap window insert <s-tab> <c-p>
}
hook global RegisterModified '"' %{ nop %sh{
printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 &
}}
# Trim trailing whitespace
hook global BufWritePre .* %{ try %{
execute-keys -draft \%s\h+$<ret>d
} }