107 lines
3.7 KiB
Text
107 lines
3.7 KiB
Text
eval %sh{ kak-tree-sitter -vvvvv -dks --init $kak_session }
|
|
evaluate-commands %sh{kak-popup init}
|
|
colorscheme ashen
|
|
# colorscheme one-dark
|
|
# colorscheme mocha
|
|
require-module fishr
|
|
require-module peneira
|
|
|
|
try %{
|
|
set-option global ashen_dynamic_cursor true
|
|
set-option global ashen_eol_cursor true
|
|
}
|
|
# disable clippy
|
|
set-option global ui_options terminal_assistant=none
|
|
|
|
hook global ModuleLoaded wayland %{
|
|
set-option global termcmd 'footclient sh -c'
|
|
}
|
|
|
|
# This gets overridden by editorconfig but we set sane default anyways
|
|
set-option global tabstop 4
|
|
set-option global indentwidth 4
|
|
|
|
set-option global scrolloff 3,3
|
|
|
|
define-command -override tree-sitter-user-after-highlighter %{
|
|
add-highlighter -override buffer/show-matching show-matching
|
|
}
|
|
|
|
# make brackets gray a-la Ashen
|
|
add-highlighter global/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373
|
|
# special highlighting for escaped goodies in regex
|
|
add-highlighter global/regex-escaped regex \\[\[\]\(\)\{\}fnrtv0\\dwshDWSH] 0:rgb:e5e5e5
|
|
add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing
|
|
# add-highlighter global/ show-matching
|
|
|
|
hook global WinCreate .* %{
|
|
ui-wrap-enable
|
|
ui-scrolloff-toggle
|
|
add-highlighter window/number-lines number-lines -hlcursor -relative -separator " "
|
|
}
|
|
|
|
map -docstring "quit" global user q ": q<ret>"
|
|
map -docstring "quit" global normal <c-q> ": q<ret>"
|
|
map -docstring "quit" global user Q ": q!<ret>"
|
|
map -docstring "quit" global normal <c-Q> ": q!<ret>"
|
|
map -docstring "save" global normal <c-v> ": write<ret>"
|
|
map -docstring "save" global normal <a-v> ": write!<ret>"
|
|
# map -docstring "save" global normal <a-v> ": write-all<ret>"
|
|
# map -docstring "save" global normal <a-V> ": write-all!<ret>"
|
|
|
|
map -docstring "close current buffer" global user x ": db<ret>"
|
|
map -docstring "goto previous buffer" global user m ": bp<ret>"
|
|
map -docstring "goto next buffer" global user i ": bn<ret>"
|
|
map -docstring "goto previous buffer" global normal <c-m> ": bp<ret>"
|
|
map -docstring "goto next buffer" global normal <c-i> ": bn<ret>"
|
|
|
|
# map global normal X "x<a-semicolon>"
|
|
|
|
# map global normal <c-u> ":exec <c-u>vv<ret>"
|
|
# map global normal <c-d> ":exec <c-d>vv<ret>"
|
|
|
|
map global normal <tab> _
|
|
|
|
# map global normal <a-X> <a-x>
|
|
# map global normal <a-x> '<a-i>p'
|
|
|
|
map -docstring "comment line" global normal "#" ": comment-line<ret>"
|
|
map -docstring "comment block" global normal "<a-#>" ": comment-block<ret>"
|
|
|
|
map -docstring "format" global normal = ": format-buffer<ret>"
|
|
map -docstring "format" global normal <a-=> ": format-selections<ret>"
|
|
|
|
# Case-insensitive Search
|
|
map -docstring 'case insensitive search' global user '/' /(?i)
|
|
map -docstring 'case insensitive backward search' global user '<a-/>' <a-/>(?i)
|
|
map -docstring 'case insensitive extend search' global user '?' ?(?i)
|
|
map -docstring 'case insensitive backward extend-search' global user '<a-?>' <a-?>(?i)
|
|
|
|
# Arrow keys for menu selections
|
|
# map -docstring 'Select next menu' global prompt <down> <tab>
|
|
# map -docstring 'Select previous menu' global prompt <up> <s-tab>
|
|
# hook global InsertCompletionShow .* %{
|
|
# map window insert <down> <c-n>
|
|
# map window insert <up> <c-p>
|
|
# hook -once window InsertCompletionHide .* %{
|
|
# unmap window insert <down>
|
|
# unmap window insert <up>
|
|
# }
|
|
# }
|
|
|
|
map -docstring 'Select to file end' global user N "Gj<a-L>L"
|
|
map -docstring 'Extend to file end' global user n "gj<a-l>l"
|
|
|
|
define-command -docstring %{
|
|
Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
|
|
} typst %{
|
|
nop %sh{
|
|
{
|
|
"$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
|
|
} > /dev/null 2>&1 < /dev/null &
|
|
}
|
|
}
|
|
define-command -docstring "Create a scratch buffer" scratch %{
|
|
edit -scratch
|
|
}
|
|
alias global s scratch
|