--- /dev/null
+# begin
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# set global ui_options terminal_set_title=true
+# this is shit as hell and needs pull request #4265
+# its usage is only documented in #3829
+hook global WinCreate .* %{
+ set-option window ui_options "terminal_set_title=%val{bufname} - Kakoune"
+ # hacky debug window
+ #set-option window ui_options "terminal_set_title=%val{config} - Kakoune"
+}
+
+def import -override -params 1 %{
+ source %sh{echo ${kak_config}/$1.kak}
+}
+
+# Clipboard (wayland) integration
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+hook global NormalKey y %{ nop %sh{
+ printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 &
+}}
+
+
+# run on file open
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+hook global BufCreate [^*].* %{
+ nop %sh{
+ mru=~/.cache/kak-mru
+ echo "$kak_buffile" | awk '!seen[$0]++' - "$mru" | sponge "$mru"
+ }
+}
+
+hook global WinCreate ^[^*]+$ %{
+ editorconfig-load # needs editorconfig-core-c with use-flag "+cli" on Gentoo
+}
+
+hook global BufOpenFile .* %{
+ modeline-parse
+}
+
+# dynamic scrolloff
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+hook global WinCreate [^*].* %{
+ hook -once window WinDisplay .* %{
+ hook window WinResize [0-9]*\.[0-9]* %{
+ set-option window scrolloff %sh{
+ printf '%u,%u' "$(($kak_window_height / 7))" "$(($kak_window_width / 28))"
+ }
+ }
+ }
+}
+
+# session manager integration (kkga/kks)
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# evaluate-commands %sh{ kks init }
+# define-command -override kks-connect -params 1.. -command-completion %{
+# %arg{1} sh -c %{
+# export EDITOR='kks edit'
+# export KKS_SESSION=$1
+# export KKS_CLIENT=$2
+# shift 3
+
+# [ $# = 0 ] && set "$SHELL"
+
+# "$@"
+# } -- %val{session} %val{client} %arg{@}
+# }
+
+# Enable PLUGin manager
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# after first sync of the dotfiles, bundle needs to be installed manually,
+# in order to sync all other plugins with git"
+
+source "%val{config}/bundle/plugins/kak-bundle/rc/kak-bundle.kak"
+bundle kak-bundle https://codeberg.org/jdugan6240/kak-bundle
+bundle kakoune-sudo-write https://github.com/occivink/kakoune-sudo-write
+bundle kakoune-find https://github.com/occivink/kakoune-find
+bundle kakoune-expand https://github.com/occivink/kakoune-expand
+bundle foot.kak https://github.com/kkga/foot.kak
+bundle kakoune-surround https://github.com/h-youhei/kakoune-surround
+bundle kakship https://github.com/eburghar/kakship %{
+ kakship-enable
+}
+ bundle-install-hook kakship %{
+ cargo install --force --path . --root ~/.local
+ [ ! -e $kak_config/starship.toml ] && cp starship.toml $kak_config/
+ }
+bundle-noload dabruin.kak https://git.sr.ht/~nasmevka/dabruin.kak
+ bundle-install-hook dabruin.kak %{
+ mkdir -p ${kak_config}/colors
+ ln -sf "${kak_opt_bundle_path}/dabruin.kak" "${kak_config}/colors/"
+ ln -sf "${kak_opt_bundle_path}/dabruin-light.kak" "${kak_config}/colors/"
+ }
+ bundle-cleaner dabruin.kak %{
+ rm -f "${kak_config}/colors/dabruin.kak"
+ rm -f "${kak_config}/colors/dabruin-light.kak"
+ }
+bundle kakoune-table https://gitlab.com/listentolist/kakoune-table
+bundle kakoune-lsp https://github.com/kakoune-lsp/kakoune-lsp %{
+ bundle-install-hook kakoune-lsp %{
+ cargo build --release --locked
+ cargo install --locked --force --path .
+ }
+ set global lsp_diagnostic_line_error_sign '║'
+ set global lsp_diagnostic_line_warning_sign '┊'
+ define-command ne -docstring 'go to next error/warning from lsp' %{ lsp-find-error --include-warnings }
+ define-command pe -docstring 'go to previous error/warning from lsp' %{ lsp-find-error --previous --include-warnings }
+ define-command ee -docstring 'go to current error/warning from lsp' %{ lsp-find-error --include-warnings; lsp-find-error --previous --include-warnings }
+ # define-command lsp-restart -docstring 'restart lsp server' %{ lsp-stop; lsp-start }
+ # hook global WinSetOption filetype=(c|cpp|cc|rust|javascript|typescript) %{
+ # set-option window lsp_auto_highlight_references true
+ # set-option window lsp_hover_anchor false
+ # lsp-auto-hover-enable
+ # echo -debug "Enabling LSP for filtetype %opt{filetype}"
+ # lsp-enable-window
+ # }
+ # hook global WinSetOption filetype=(rust) %{
+ # set window lsp_server_configuration rust.clippy_preference="on"
+ # }
+ # hook global WinSetOption filetype=rust %{
+ # hook window BufWritePre .* %{
+ # evaluate-commands %sh{
+ # test -f rustfmt.toml && printf lsp-formatting-sync
+ # }
+ # }
+ # }
+ evaluate-commands %sh{ kak-lsp }
+ lsp-enable
+ hook global KakEnd .* lsp-exit
+}
+
+# Enable some linting and formatting
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+source %sh{
+ echo ${kak_config}/languagecmd.kak # borrowed from https://git.sr.ht/~nasmevka
+}
+
+# Enable some code formaters
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+hook global BufSetOption filetype=(js|javascript) %{
+ set-option buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
+}
+hook global WinSetOption filetype=scss %{
+ set-option buffer formatcmd 'npx prettier --parser scss --stdin-filepath=%val{buffile}'
+}
+hook global WinSetOption filetype=less %{
+ set-option buffer formatcmd 'npx prettier --parser less --stdin-filepath=%val{buffile}'
+}
+hook global WinSetOption filetype=html %{
+ set-option buffer formatcmd 'npx prettier --parser html --stdin-filepath=%val{buffile}'
+}
+hook global WinSetOption filetype=md %{
+ set-option buffer formatcmd 'npx prettier --parser md --stdin-filepath=%val{buffile}'
+}
+hook global WinSetOption filetype=sh %{
+ # needs shfmt: $ go install mvdan.cc/sh/v3/cmd/shfmt@latest
+ set-option buffer formatcmd "shfmt -i 4 -ci -sr -"
+}
+hook global WinSetOption filetype=yaml %{
+ set-option buffer formatcmd "npx prettier --parser yaml --stdin-filepath=%val{buffile}"
+}
+hook global WinSetOption filetype=(json|jsonc) %{
+ set-option buffer formatcmd "jq --indent %opt{tabstop} ."
+}
+
+# Enable some code linters
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+hook global WinSetOption filetype=(c|h) %{
+ set-option window lintcmd "cppcheck --language=c --enable=warning,style,information --template='{file}:{line}:{column}: {severity}: {message}' --suppress='*:*.h' 2>&1"
+}
+hook global WinSetOption filetype=css %{
+ set-option window lintcmd "npx stylelint --formatter unix --stdin-filename='%val{buffile}'"
+}
+hook global WinSetOption filetype=(json|jsonc) %{
+ set-option window lintcmd %{ run() { cat -- "$1" | jq 2>&1 | awk -v filename="$1" '/ at line [0-9]+, column [0-9]+$/ { line=$(NF - 2); column=$NF; sub(/ at line [0-9]+, column [0-9]+$/, ""); printf "%s:%d:%d: error: %s", filename, line, column, $0; }'; } && run }
+}
+hook global WinSetOption filetype=sh %{
+ # needs shfmt: $ go install mvdan.cc/sh/v3/cmd/shfmt@latest
+ set-option window lintcmd "shellcheck -fgcc -Cnever"
+}
+hook global WinSetOption filetype=yaml %{
+ set-option window lintcmd %{
+ run() {
+ # change [message-type] to message-type:
+ yamllint -f parsable "$1" | sed 's/ \[\(.*\)\] / \1: /'
+ } && run }
+}
+
+
+# Look and Feel
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# dabruin colorscheme config in separate file
+source "%val{config}/dabruin-wrapper.kak"
+# with the following values:
+# declare-option str dabruin_background 'rgb:181818'
+# declare-option str dabruin_accent 'rgb:86c1b9'
+# colorscheme dabruin
+
+set-face global StatusLine cyan,default,default
+set-face global StatusLineInfo blue,default,default
+set-face global StatusLineMode black,yellow,default
+set-face global StatusLineValue green,default,default
+
+
+# wrapping only word-wise
+add-highlighter global/ wrap -word -indent
+
+# trailing whitespaces in red
+add-highlighter global/trailing-whitespace regex '\h+$' 0:Error
+
+# highlight comment tags
+add-highlighter global/todos regex '(//|#|/\*)\h*(TODO|WARNING|FIXME|MAYBE)[:]?[^\n]*' 1:default+bu@comment
+
+# show matching brackets
+add-highlighter global/ show-matching
+
+# absolute line nums everywhere
+add-highlighter global/ number-lines -hlcursor -min-digits 3
+
+
+# Different Cursor color in insert mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# Recolor the status line on insert mode.
+hook global ModeChange (push|pop):.*:insert %{
+ set-face window StatusLine black,yellow
+ set-face window StatusLineInfo blue,black
+ set-face window StatusLineMode black,yellow
+}
+
+# Undo colour changes when we leave insert mode.
+hook global ModeChange (push|pop):insert:.* %{
+ # unset-face window StatusLine
+ set-face window StatusLine yellow,black
+ set-face window StatusLineInfo blue,default
+ set-face window StatusLineMode black,yellow
+}
+
+
+# Extra editor commands
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+# tab replacement
+define-command -hidden clean-selections -docstring 'Replace tabs with spaces and trim trailing whitespace' %{ try %{
+ execute-keys -draft @s\h+$<ret>d
+} }
+define-command -hidden clean-buffer -docstring 'Replace tabs with spaces and trim trailing whitespace' %{ try %{
+ execute-keys -draft \%@s\h+$<ret>d
+} }
+
+# Bring back inc command to increment/decrement the number under the cursor
+define-command -hidden -params 2 inc %{ try %{
+ evaluate-commands %sh{
+ [ "$1" = 0 ] && count=1 || count="$3"
+ printf '%s%s' 'exec h"_/\d<ret><a-i>na' "$2($count)<esc>|{<space>cat<semicolon>echo<semicolon>}|bc<ret>"
+ }
+} catch %{
+ execute-keys l
+}}
+
+# preview hex color codes with a leading #
+declare-option -hidden range-specs hex_color_code_ranges
+add-highlighter shared/hex_color_code ranges hex_color_code_ranges
+
+define-command update_hex_color_code_ranges %{
+ set-option window hex_color_code_ranges %val{timestamp}
+ evaluate-commands -draft %{
+ execute-keys 'gtGbx'
+ evaluate-commands -draft -verbatim try %{
+ execute-keys 's\B#([0-9A-Fa-f]{6})\b<ret>'
+ evaluate-commands -itersel %{
+ set-option -add window hex_color_code_ranges "%val{selection_desc}|default,rgb:%reg{1}"
+ }
+ }
+ evaluate-commands -draft -verbatim try %{
+ execute-keys 's\B#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])\b<ret>'
+ evaluate-commands -itersel %{
+ set-option -add window hex_color_code_ranges "%val{selection_desc}|default,rgb:%reg{1}%reg{1}%reg{2}%reg{2}%reg{3}%reg{3}"
+ }
+ }
+ }
+}
+
+hook -always global NormalIdle '' update_hex_color_code_ranges
+hook -always global InsertIdle '' update_hex_color_code_ranges
+hook -always global PromptIdle '' update_hex_color_code_ranges
+
+# preview hex color codes without leading #
+declare-option -hidden range-specs hex_color_code_ranges2
+add-highlighter shared/hex_color_code2 ranges hex_color_code_ranges2
+
+define-command update_hex_color_code_ranges2 %{
+ set-option window hex_color_code_ranges2 %val{timestamp}
+ evaluate-commands -draft %{
+ execute-keys 'gtGbx'
+ evaluate-commands -draft -verbatim try %{
+ execute-keys 's\B"([0-9A-Fa-f]{6})\b"<ret>'
+ execute-keys -draft 'S"<ret>'
+ evaluate-commands -itersel %{
+ set-option -add window hex_color_code_ranges2 "%val{selection_desc}|default,rgb:%reg{1}"
+ }
+ }
+ }
+}
+
+hook -always global NormalIdle '' update_hex_color_code_ranges2
+hook -always global InsertIdle '' update_hex_color_code_ranges2
+hook -always global PromptIdle '' update_hex_color_code_ranges2
+
+# normal mode kks mappings
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+map global normal -docstring 'terminal' <c-t> ': kks-connect terminal<ret>'
+map global normal -docstring 'files' <c-f> ': kks-connect popup kks-files<ret>'
+map global normal -docstring 'buffers' <c-b> ': kks-connect popup kks-buffers<ret>'
+map global normal -docstring 'live grep' <c-g> ': kks-connect popup kks-grep<ret>'
+map global normal -docstring 'lines in buffer' <c-l> ': kks-connect popup kks-lines<ret>'
+map global normal -docstring 'recent files' <c-r> ': kks-connect popup kks-mru<ret>'
+map global normal -docstring 'vcs client' <c-v> ': kks-connect popup lazygit<ret>'
+map global normal -docstring 'file browser' <c-h> ': kks-connect popup kks-lf<ret>'
+
+# normal mode additional mappings
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+map global normal q Q # move record to 'Q'
+unmap global normal q # keep 'q' clean
+map global goto m '<esc>m;' -docstring 'matching char'
+map global normal -docstring 'comment line' '#' ': comment-line<ret>'
+map global normal -docstring 'comment block' <a-#> ': comment-block<ret>'
+map global normal -docstring 'Next buffer ' <c-n> ': buffer-next<ret>'
+map global normal -docstring 'Previous buffer' <c-p> ': buffer-previous<ret>'
+map global normal -docstring 'Delete buffer' <c-q> ': delete-buffer<ret>'
+map global normal -docstring 'add 1 int' '^' ': inc %val{count} +<ret>'
+map global normal -docstring 'substract 1 int' <a-^> ': inc %val{count} -<ret>'
+map global normal -docstring 'surround' 0 ': surround<ret>'
+
+# default user mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+map global user -docstring 'buffer mode' b ': enter-user-mode buffermode<ret>'
+map global user -docstring 'git mode' g ': enter-user-mode gitmode<ret>'
+map global user -docstring 'selection mode' s ': enter-user-mode selmode<ret>'
+map global user -docstring 'LSP mode' l ': enter-user-mode lsp<ret>'
+map global user -docstring 'Table mode' t ': enter-user-mode table<ret>'
+map global user -docstring 'Table mode (locked)' T ': enter-user-mode -lock table<ret>'
+map global user -docstring ':::::::::::::::::::::::::::::::: ::' : ': <esc>'
+map global user -docstring 'Edit kakrc' E ': e ~/.config/kak/kakrc<ret>'
+map global user -docstring 'highlight hex color without leading #' p ': addhl global/hex_color_code2 ref hex_color_code2<ret>'
+map global user -docstring 'unhighlight hex color without leading #' <s-p> ': rmhl global/hex_color_code2<ret>'
+map global user -docstring 'highlight hex color with leading #' '#' ': addhl global/hex_color_code ref hex_color_code<ret>'
+map global user -docstring 'unhighlight hex color with leading #' <a-#> ': rmhl global/hex_color_code<ret>'
+map global user -docstring 'Scratch buffer' S ': buffer *scratch*<ret>'
+map global user -docstring 'Debug buffer' D ': buffer *debug*<ret>'
+map global user -docstring 'expand selection' e ': expand<ret>'
+map global user -docstring 'insert newline above current' n ' O<esc>j'
+map global user -docstring 'insert newline below current' N ' o<esc>k'
+map global user -docstring 'relative line numbers enable' r ': addhl window/nl number-lines -min-digits -1 -relative -hlcursor<ret>'
+map global user -docstring 'relative line numbers disable' R ': rmhl window/nl<ret>'
+map global user -docstring 'help command mode enable' h ': set -add global autoinfo normal<ret>'
+map global user -docstring 'help command mode disable' H ': set -remove global autoinfo normal<ret>'
+map global user -docstring 'case insensitive search' '/' /(?i)
+map global user -docstring 'case insensitive backward search' '<a-/>' <a-/>(?i)
+map global user -docstring 'case insensitive extend search' '?' ?(?i)
+map global user -docstring 'case insensitive backward extend-search' '<a-?>' <a-?>(?i)
+
+
+# kak-lsp keys
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
+map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
+map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
+map global object f '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
+map global object t '<a-semicolon>lsp-object Class Interface Struct<ret>' -docstring 'LSP class interface or struct'
+map global object d '<a-semicolon>lsp-diagnostic-object --include-warnings<ret>' -docstring 'LSP errors and warnings'
+map global object D '<a-semicolon>lsp-diagnostic-object<ret>' -docstring 'LSP errors'
+
+# buffer user mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+declare-user-mode buffermode
+map global buffermode -docstring 'enable autocomplete' a ': set-option -add buffer autocomplete insert<ret>'
+map global buffermode -docstring 'disable Autocomplete' A ': set-option -remove buffer autocomplete insert<ret>'
+map global buffermode -docstring 'clean tabs and trailing whitespaces' c ': clean-buffer<ret>'
+map global buffermode -docstring 'delete buffer' d ': delete-buffer<ret>'
+map global buffermode -docstring 'show file info' i ': info "file saved at %sh{date}"<ret>'
+map global buffermode -docstring 'list buffers' l ': kks-connect terminal-popup kks-buffers<ret>'
+map global buffermode -docstring 'Lint buffer' L ': buffer *lint-output*<ret>'
+map global buffermode -docstring 'next buffer' n ': buffer-next<ret>'
+map global buffermode -docstring 'previous buffer' p ': buffer-previous<ret>'
+map global buffermode -docstring 'wrap enable' w ': add-highlighter buffer/bw wrap<ret>'
+map global buffermode -docstring 'Wrap disable' W ': remove-highlighter buffer/bw<ret>'
+
+# selection user mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+declare-user-mode selmode
+map global selmode -docstring 'clean tabs and trailing whitespaces' C ': clean-selections<ret>'
+map global selmode -docstring 'sort words Horizontally in selection' h '| xargs -n1 | sort -u | xargs <ret>'
+map global selmode -docstring 'sort words Vertically in selection ' v '| sort -n <ret>'
+map global selmode -docstring 'surround' s ':surround<ret>'
+map global selmode -docstring 'change surround' c ':change-surround<ret>'
+map global selmode -docstring 'delete surround' d ':delete-surround<ret>'
+map global selmode -docstring 'select tag' t ':select-surrounding-tag<ret>'
+
+# git user mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+declare-user-mode gitmode
+map global gitmode -docstring 'Blame jump' b ':git blame-jump<ret>'
+map global gitmode -docstring 'Blame annotations' B ':git blame<ret>'
+map global gitmode -docstring 'Diff' d ':git diff<ret>'
+map global gitmode -docstring 'Edit' e ':git edit<ret>'
+map global gitmode -docstring 'Log' l ':git log --oneline<ret>'
+map global gitmode -docstring 'Log (full)' L ':git log<ret>'
+map global gitmode -docstring 'Next hunk' n ':git next-hunk<ret>'
+map global gitmode -docstring 'Previous hunk' p ':git prev-hunk<ret>'
+map global gitmode -docstring 'Status' s ':git status<ret>'
+
+# terminal config (via foot.kak)
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+set-option global foot_normal_cmd 'foot'
+set-option global foot_popup_cmd 'foot'
+set-option global foot_panel_cmd 'foot'
+set-option global foot_normal_flags ''
+set-option global foot_popup_flags '--app-id=kakpopup' '--window-size-chars=240x40'
+# set-option global foot_popup_flags '--app-id=kakpopup'
+set-option global foot_panel_flags '--app-id=kakpanel' '--window-size-chars=240x1'
+
--- /dev/null
+add_newline = false
+format = """\
+${custom.kaklsp_err}\
+${custom.kaklsp_warn}\
+${custom.kaklsp_hint}\
+${custom.kaklsp_code_actions}\
+${custom.kaklsp_progress}\
+${custom.kakmode}\
+${custom.kakcontext}\
+$git_branch\
+$git_commit\
+$git_state\
+$git_status\
+$directory\
+${custom.kakfile}\
+${custom.kakfiletype}\
+$package\
+${custom.kaksession}\
+${custom.kakbuflist}\
+${custom.kakcursor}\
+${custom.kakposition}\
+"""
+# use this useless block to prevent spilling colors on insert mode
+# [█](fg:black bg:black)
+# powerline symbols
+# ' '' '' '' '' '' ''
+
+[fill]
+symbol = ' '
+
+[custom.kaklsp_err]
+description = "Show errors number from kak-lsp if any"
+format = "[ %opt{lsp_diagnostic_error_count}]($style)"
+style = "fg:red bold bg:default"
+when = '[ -n "$kak_opt_lsp_diagnostic_error_count" -a "$kak_opt_lsp_diagnostic_error_count" -ne 0 ]'
+shell = ['sh']
+disabled = false
+
+[custom.kaklsp_warn]
+description = "Show warnings number from kak-lsp if any"
+format = "[ %opt{lsp_diagnostic_warning_count}]($style)"
+style = "fg:yellow bold bg:default"
+when = '[ -n "$kak_opt_lsp_diagnostic_warning_count" -a "$kak_opt_lsp_diagnostic_warning_count" -ne 0 ]'
+shell = ['sh']
+disabled = false
+
+[custom.kaklsp_hint]
+description = "Show hints number from kak-lsp if any"
+format = "[ ﯦ %opt{lsp_diagnostic_hint_count}]($style)"
+style = "fg:white bold bg:default"
+when = '[ -n "$kak_opt_lsp_diagnostic_hint_count" -a "$kak_opt_lsp_diagnostic_hint_count" -ne 0 ]'
+shell = ['sh']
+disabled = false
+
+[custom.kaklsp_code_actions]
+description = "Show lsp code actions if any"
+format = "[ %opt{lsp_modeline_code_actions} ]($style)"
+style = "fg:yellow bold bg:default"
+when = '[ -n "$kak_opt_lsp_modeline_code_actions" ]'
+shell = ['sh']
+disabled = false
+
+[custom.kaklsp_progress]
+description = "Show activity of kak-lsp if any"
+format = " [ ]($style)"
+style = "fg:bright-white bold bg:default"
+when = '[ -n "$kak_opt_lsp_modeline_progress" ]'
+shell = ['sh']
+disabled = false
+
+[git_branch]
+symbol = ""
+style = "fg:black bg:cyan bold"
+format = '[ ](fg:cyan bg:black)[ $symbol $branch ]($style)'
+
+[git_commit]
+format = '[ \($hash$tag\)]($style)'
+style = 'bg:cyan fg:bright-black'
+commit_hash_length = 6
+only_detached = false
+tag_symbol = ' 笠'
+tag_disabled = false
+disabled = false
+
+[git_state]
+format = '\( [$state($progress_current/$progress_total)]($style)\)'
+style = "bg:cyan fg:black"
+rebase = 'REBASING'
+merge = 'MERGING'
+revert = 'REVERTING'
+cherry_pick = 'CHERRY-PICKING'
+bisect = 'BISECTING'
+am = 'AM'
+am_or_rebase = 'AM/REBASE'
+disabled = true
+
+[git_status]
+format = '[ \[$all_status$ahead_behind\]]($style)[ ]($style)'
+style = 'fg:black bold bg:cyan'
+stashed = '\$'
+ahead = '⇡${count}'
+behind = '⇣${count}'
+diverged = '⇕⇡${ahead_count}⇣${behind_count}'
+conflicted = '='
+deleted = '✘'
+renamed = '»'
+modified = '!'
+staged = '+'
+untracked = '?'
+disabled = false
+
+[directory]
+format = '[](fg:green bg:cyan)[ $read_only]($style)[$path]($style)'
+truncation_length = 8
+truncate_to_repo = true
+fish_style_pwd_dir_length = 0
+use_logical_path = true
+style = 'bg:green fg:black'
+read_only_style = 'bg:green fg:red'
+read_only = '[]'
+truncation_symbol = '…'
+home_symbol = " "
+disabled = false
+
+[directory.substitutions]
+"dotfiles" = ""
+"~/.config" = " "
+"~/.workspace/rust" = ""
+"~/.workspace/docker" = " "
+"~/.workspace/alpine" = " "
+"~/.workspace/arch" = " "
+"~/.workspace/kustomize" = "ﴱ "
+"~/.workspace/node" = ""
+"~/.workspace" = " "
+"~/scm" = " "
+# "~" = " "
+
+[custom.kakfile]
+description = 'The current Kakoune buffername'
+format = '[/$output ]($style)'
+style = 'bg:green fg:black'
+command = 'echo -n ${kak_buffile##*/}'
+when = 'true'
+shell = ['sh']
+disabled = false
+
+[custom.kakfiletype]
+description = 'The current buffer filetype'
+format = '[](fg:black bg:green)[ %opt{filetype} ]($style)'
+style = 'bg:black fg:yellow'
+when = ''
+shell = ['true']
+disabled = false
+
+[custom.kakbuflist]
+description = "Open buffers"
+format = '[](fg:white bg:bright-black)[ numbufs: $output ]($style)'
+style = 'bg:white fg:black'
+when = 'true'
+shell = ['sh']
+command = 'kks get -s ${kak_session##*/} %val{buflist} | grep -vE "(\*debug\*|\*scratch\*)" | wc -w'
+disabled = false
+
+[custom.kaksession]
+description = 'The current Kakoune session'
+format = '[](fg:bright-black bg:black)[ %val{client}:%val{session} ]($style)'
+style = 'bg:bright-black fg:black'
+when = ''
+shell = ['true']
+disabled = false
+
+[custom.kakcursor]
+description = 'The current Kakoune cursor position'
+format = '[](fg:bright-white bg:white)[%val{cursor_line}:%val{cursor_char_column}]($style)'
+style = 'fg:black bg:bright-white'
+when = ''
+shell = ['true']
+disabled = false
+
+[custom.kakposition]
+description = 'Relative position of the cursor inside the buffer'
+format = '[ $output]($style)[ ]($style)'
+style = 'fg:black bg:bright-white'
+command = 'echo -n $(($kak_cursor_line * 100 / $kak_buf_line_count))%'
+when = '[ -n "$kak_cursor_line" ]'
+shell = ['sh']
+disabled = false
+
+[custom.kakcontext]
+description = 'The current Kakoune context'
+format = '{{context_info}}'
+when = ''
+shell = ['true']
+disabled = false
+
+[custom.kakmode]
+description = 'The current Kakoune mode'
+format = '{{mode_info}}'
+when = ''
+shell = ['true']
+disabled = false
+