summaryrefslogtreecommitdiff
path: root/.config/kak/kakrc
blob: cfff6133d971da23a6f3d1e4afd475fce347ed30 (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
27
28
29
30
31
32
33
source "%val{config}/plugins/plug.kak/rc/plug.kak"
plug "andreyorst/plug.kak" noload
plug "andreyorst/fzf.kak"

colorscheme gruvbox

set window tabstop 4
set window indentwidth 0

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-p> ': fzf-mode <ret>'
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'

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

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

hook global WinSetOption filetype=(latex) %{
    lsp-enable-window
    # map window user o %{: nop %sh{ setsid zathura %val{buffile} } }
    # hook window BufWritePost .* %{ %sh{ pdflatex %val{buffile} } }
}

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