summaryrefslogtreecommitdiff
path: root/.config/kak/kakrc
blob: 72a88c49dca5f80e9b92a750f3b0332524874ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
source "%val{config}/plugins/plug.kak/rc/plug.kak"
plug "andreyorst/plug.kak" noload

set-option global tabstop 4
set-option global indentwidth 0
set-option global autoreload true

add-highlighter global/ column 80  default,rgb:404040
add-highlighter global/ column 120 default,rgb:404040
add-highlighter global/ number-lines -min-digits 3

map global normal <c-k> ': comment-line <ret>'

map global user   y     '<a-|> xclip -i -selection clipboard <ret>' -docstring 'yank to system clipboard'
map global user   f     '| par -w80 <ret>' -docstring 'reformat selection with external tool'
map global user   l     %{: enter-user-mode lsp <ret>} -docstring 'LSP mode'

eval %sh{kak-lsp --kakoune -s $kak_session}

hook global BufCreate .*\.tex %{
    set-option buffer filetype latex
}

hook global WinSetOption filetype=(latex|c|cpp) %{
    lsp-enable-window
}