]> Freerunner's - kakoune-config.git/commitdiff
update config
authorAndre Ramnitz <tux.rising@gmail.com>
Mon, 12 Jan 2026 23:54:38 +0000 (00:54 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 12 Jan 2026 23:54:38 +0000 (00:54 +0100)
kakrc
languagecmd.kak

diff --git a/kakrc b/kakrc
index 05d22569ac55255b6a7807c463d28b01660d52a3..f3f2a8a8b00c85df1b26dab56faf645756e6154c 100644 (file)
--- a/kakrc
+++ b/kakrc
@@ -50,8 +50,6 @@ hook global WinCreate [^*].* %{
 evaluate-commands %sh{ kks init }
 define-command -override kks-connect -params 1.. -command-completion  %{
   %arg{1} sh -c %{
-    export EDITOR='kks edit'
-    export VISUAL='kks edit'
     export KKS_SESSION=$1
     export KKS_CLIENT=$2
     shift 3
@@ -75,6 +73,7 @@ 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 shadow.kak https://github.com/ftonneau/shadow.kak
+bundle small.kak https://git.sr.ht/~nasmevka/small.kak
 bundle kakship https://github.com/eburghar/kakship %{
     kakship-enable
 }
@@ -133,6 +132,14 @@ source %sh{
     echo ${kak_config}/languagecmd.kak # boilerplate from https://git.sr.ht/~nasmevka
 }
 
+# Small.kak config
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+define-command -hidden -docstring %{
+    enter-spacemode: transform all tabulations as spaces and launch small-spacetab.
+} enter-spacemode %{
+    try %{ execute-keys 'Z%s\t<ret>@z' }
+    small-spacetab-kak
+}
 
 # Shadow.kak config
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -145,9 +152,9 @@ border ^\h*``` default,rgb:c9afaf
 
 # kak
 shadow-set kak \
-comment ^# ^# nofirst nolast default
+comment ^# \n\h* first last default,rgb:1d1c1d
 shadow-decorate kak \
-border ^# default,rgb:222222
+border ^\h# default,rgb:222222
 
 
 # Look and Feel
@@ -263,7 +270,7 @@ hook -always global PromptIdle '' update_hex_color_code_ranges2
 
 # default normal mode kks mappings
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-map global normal -docstring 'terminal'                                <c-t>  ': kks-connect terminal<ret>'
+map global normal -docstring 'terminal'                                <c-c>  ': kks-connect terminal<ret>'
 map global normal -docstring 'terminal'                                <F2>  ': kks-connect terminal<ret>'
 map global normal -docstring 'files'                                   <c-f>  ': kks-connect popup kks-files<ret>'
 map global normal -docstring 'files'                                   <F3>  ': kks-connect popup kks-files<ret>'
@@ -305,9 +312,9 @@ map global normal -docstring 'help'                                     <F1>  ':
 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 '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>'
@@ -329,6 +336,11 @@ map global user -docstring 'case insensitive extend search'              '?' ?(?
 map global user -docstring 'case insensitive backward extend-search' '<a-?>' <a-?>(?i)
 
 
+# ui overrides
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+map global prompt <c-n> <tab>
+map global prompt <c-p> <s-tab>
+
 # 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'
index ce15ee56ebc605e18de970efb8dc1190e819a709..faf261b97752dbda89d56d1c2060e0e3eff1283f 100644 (file)
@@ -1,10 +1,18 @@
 ## Languages
 # ──────────────────────────────────────────────────────────────────────────────
 # stolen from git.sr.ht/~nasmevka/kak
+### kak
+hook -group languagecmd global WinSetOption filetype=kakrc %{
+    set-option buffer tabstop 4
+    set-option buffer indentwidth 4
+        enter-spacemode
+    add-highlighter buffer/kakrc-whitespaces show-whitespaces -indent '¦' -spc ' ' -lf ' '
+}
+
 ### golang
 hook -group languagecmd global WinSetOption filetype=go %{
     set-option buffer formatcmd 'gofumpt'
-    set-option buffer lintcmd          "golangci-lint run --out-format=line-number --uniq-by-line=true --allow-parallel-runners | grep %val{bufname} #"
+    set-option buffer lintcmd   "golangci-lint run --out-format=line-number --uniq-by-line=true --allow-parallel-runners | grep %val{bufname} #"
 }
 
 ### json
@@ -15,8 +23,12 @@ hook -group languagecmd global WinSetOption filetype=(json|jsonc) %{
 
 ### python
 hook -group languagecmd global WinSetOption filetype=python %{
-    set-option buffer formatcmd 'black --line-length 150 -'
-    set-option buffer lintcmd   'ruff check --format=text --line-length=150'
+    set-option buffer formatcmd 'ruff format --line-length 150 -'
+    set-option buffer lintcmd   'ruff check --output-format=concise --line-length=150'
+    set-option buffer tabstop 4
+    set-option buffer indentwidth 4
+        enter-spacemode
+    add-highlighter buffer/python-whitespaces show-whitespaces -indent '¦' -spc ' ' -lf ' '
 }
 
 ### shell
@@ -66,8 +78,8 @@ hook -group languagecmd global WinSetOption filetype=d %{
 
 ### Hare
 hook -group languagecmd global WinSetOption filetype=hare %{
-       set-option buffer tabstop 8
-       set-option buffer indentwidth 8
+    set-option buffer tabstop 8
+    set-option buffer indentwidth 8
 }
 
 ### CSS
@@ -84,7 +96,8 @@ hook global WinSetOption filetype=yaml %{
         yamllint -f parsable "$1" | sed 's/ \[\(.*\)\] / \1: /'                                                                        
     } && run }                                                                                                                          
     set-option buffer formatcmd "npx prettier --parser yaml --stdin-filepath=%val{buffile}"
-
+    set-option buffer tabstop 2
+    set-option buffer indentwidth 2
 }
 
 ### TODO: add corresponding linter