-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkakrc
49 lines (39 loc) · 1.4 KB
/
kakrc
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Indentation
set global tabstop 4
set global indentwidth 4
# Split window
define-command -docstring "vsplit [<commands>]: split tmux vertically" \
vsplit -params .. -command-completion %{
tmux-terminal-horizontal kak -c %val{session} -e "%arg{@}"
}
define-command -docstring "hsplit [<commands>]: split tmux horizontally" \
hsplit -params .. -command-completion %{
tmux-terminal-vertical kak -c %val{session} -e "%arg{@}"
}
# Line numbers
add-highlighter global/ number-lines
# Wrapping and reformatting
set global autowrap_column 80
add-highlighter global/ column %opt{autowrap_column} default,blue
map global normal = '|par ${kak_opt_autowrap_column}q g1<ret>'
# Highlight trailing whitespace
add-highlighter global/ regex '\h+$' 0:default,red
# File lookups
def f -params 1 -shell-script-candidates %{ find -type f } %{ edit %arg{1} }
def gf -params 1 -shell-script-candidates %{ git ls-files } %{ edit %arg{1} }
# Rego
hook global WinCreate .*\.rego %{ set buffer filetype ruby }
# PureScript
hook global WinCreate .*\.purs %{ set buffer filetype haskell }
# Email
hook global WinCreate /tmp/mutt-.* %{ set buffer filetype mail }
hook global WinSetOption filetype=mail %{
set window autowrap_column 70
}
# Grepping
set global grepcmd 'rgrep'
# kak-lsp
eval %sh{kak-lsp --kakoune -s $kak_session}
# set global lsp_cmd "kak-lsp -s %val{session} -vvv --log /tmp/kak-lsp.log"
lsp-enable
lsp-auto-hover-enable