]> Freerunner's - dotfiles.git/commitdiff
kak: made the switch from plug.kak to bundle.kak
authorAndre Ramnitz <tux.rising@gmail.com>
Sat, 17 Aug 2024 19:55:20 +0000 (21:55 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 26 Aug 2024 13:52:01 +0000 (15:52 +0200)
12 files changed:
config/kak/colors/dabruin.kak
config/kak/kakrc
config/kak/plugins/bookmarks.kak [deleted submodule]
config/kak/plugins/dabruin.kak [deleted submodule]
config/kak/plugins/foot.kak [deleted submodule]
config/kak/plugins/kak-harpoon [deleted submodule]
config/kak/plugins/kakoune-find [deleted submodule]
config/kak/plugins/kakoune-sudo-write [deleted submodule]
config/kak/plugins/kakship [deleted submodule]
config/kak/plugins/plug.kak [deleted submodule]
config/kak/plugins/smarttab.kak [deleted submodule]
config/kak/starship.toml

index da4a46bd9d588558ece61299ff0a9db4fd343608..29f6e2df84ac931c6848ecdc2986e79a49067649 120000 (symlink)
@@ -1 +1 @@
-../plugins/dabruin.kak/dabruin.kak
\ No newline at end of file
+/home/andy/.config/kak/bundle/dabruin.kak
\ No newline at end of file
index 69be1fb37523a7aa5759f07d5383d7b443aa9e65..497ad4e0f9c63c6346be8f84dff094cff44bec8d 100644 (file)
@@ -22,6 +22,7 @@ hook global NormalKey y %{ nop %sh{
 # ──────────────────────────────────────────────────────────────────────────────
 hook global BufOpenFile .* %{
     modeline-parse
+    editorconfig-load
 }
 
 hook global BufCreate [^*].* %{
@@ -31,6 +32,9 @@ hook global BufCreate [^*].* %{
      }
 }
 
+hook global BufNewFile .* %{
+    editorconfig-load
+}
 
 # dynamic scrolloff
 # ──────────────────────────────────────────────────────────────────────────────
@@ -51,36 +55,34 @@ evaluate-commands %sh{
     kks init
 }
 
-
 # Enable PLUGin manager
 # ──────────────────────────────────────────────────────────────────────────────
-source "%val{config}/plugins/plug.kak/rc/plug.kak"
-plug "andreyorst/plug.kak" noload
-    plug "Ersikan/bookmarks.kak" %{
-        hook global WinCreate .* bookmarks-enable
-    }
-    plug "andreyorst/smarttab.kak" defer smarttab %{
-        # when 'backspace' is pressed, 4 spaces are deleted at once
-       set-option global softtabstop 4
-    } config %{
-       hook global WinSetOption filetype=(rust|markdown|kak|lisp|scheme|py|sh|perl) expandtab
-       hook global WinSetOption filetype=(makefile|gas) noexpandtab
-       hook global WinSetOption filetype=(c|cpp) smarttab
-    }
-    plug "occivink/kakoune-sudo-write"
-    plug "occivink/kakoune-find"
-    plug "foot.kak"
-    plug "https://git.sr.ht/~nasmevka/dabruin.kak" noload
-    plug "eburghar/kakship" do %{
-       cargo install --force --path . --root ~/.local
+source "%val{config}/bundle/kak-bundle/rc/kak-bundle.kak"
+bundle-noload kak-bundle https://codeberg.org/jdugan6249/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 kak-harpoon https://github.com/raiguard/kak-harpoon %{
+        hook global WinCreate .* harpoon-add-bindings
+}
+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/
-    } config %{
-        kakship-enable
     }
-    plug "raiguard/kak-harpoon" %{
-        hook global WinCreate .* harpoon-add-bindings
+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"
     }
-
 
 # Enable some linting and formatting
 # ──────────────────────────────────────────────────────────────────────────────
@@ -126,23 +128,23 @@ add-highlighter global/trailing-whitespace regex '\h+$' 0:Error
 add-highlighter global/todos regex '(//|#|/\*)\h*(TODO|WARNING|FIXME)[:]?[^\n]*' 2:+bu  # highlight comment tags
 add-highlighter global/ show-matching                                                   # show matching brackets
 add-highlighter global/ number-lines -hlcursor -min-digits 3                            # absolute line nums everywhere
-declare-option str dabruin_accent 'rgb:A1B56C'
-declare-option str dabruin_background 'rgb:242124'
+declare-option str dabruin_accent 'rgb:A1B56C'
+# declare-option str dabruin_ratio '-3/5'
 colorscheme dabruin
-set-option global tabstop 4
-set-option global indentwidth 4
+set-option global tabstop 4
+set-option global indentwidth 4
 add-highlighter global/ wrap -word -indent
 
 # Different Cursor color in insert mode
 # ──────────────────────────────────────────────────────────────────────────────
 # Shades of green/yellow for insert mode.
 hook global ModeChange (push|pop):.*:insert %{
-     set-face window StatusLine black,blue
+     set-face window StatusLine black,yellow
 }
 
 # Undo colour changes when we leave insert mode.
 hook global ModeChange (push|pop):insert:.* %{
-    unset-face window StatusLine
+    unset-face window StatusLine 
 }
 
 
@@ -180,34 +182,35 @@ map global normal -docstring 'Previous buffer'  <c-p> ': buffer-previous<ret>'
 
 # default user mode
 # ──────────────────────────────────────────────────────────────────────────────
-map global user -docstring 'Buffer mode'                   b      ':enter-user-mode buffermode<ret>'
-map global user -docstring 'Selection mode'                s      ':enter-user-mode selectionmode<ret>'
-map global user -docstring 'edit kakrc'                    E      ': e ~/.config/kak/kakrc<ret>'
-map global user -docstring 'relative line numbers enable'  r      ': add-highlighter window/nl number-lines -min-digits 3 -relative -hlcursor<ret>'
-map global user -docstring 'relative line numbers disable' R      ': remove-highlighter window/nl<ret>'
-map global user -docstring 'decrease value'                d      ': inc %val{count} -<ret>'
-map global user -docstring 'increase value'                i      ': inc %val{count} +<ret>'
+map global user -docstring '(B)uffer mode'                              b  ': enter-user-mode buffermode<ret>'
+map global user -docstring '(S)election mode'                           s  ': enter-user-mode selmode<ret>'
+map global user -docstring '(e)xpand selection'                         e  ': expand<ret>'
+map global user -docstring '(E)dit kakrc'                               E  ': e ~/.config/kak/kakrc<ret>'
+map global user -docstring '(r)elative line numbers enable'             r  ': addhl window/nl number-lines -min-digits 3 -relative -hlcursor<ret>'
+map global user -docstring '(R)elative line numbers disable'            R  ': remove-highlighter window/nl<ret>'
+map global user -docstring '(d)ecrease value'                           d  ': inc %val{count} -<ret>'
+map global user -docstring '(i)ncrease value'                           i  ': inc %val{count} +<ret>'
 
 # 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 whitespace in the buffer' c ': clean-buffer<ret>'
-map global buffermode -docstring 'delete buffer' d ': delete-buffer<ret>'
-map global buffermode -docstring 'buffer picker' 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>'
+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 'buffer picker'                        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 selectionmode
-map global selectionmode -docstring 'clean tabs and trailing whitespace in selections' c ': clean-selections<ret>'
-map global selectionmode -docstring 'sort words (H)orizontally in selection ' h '| xargs -n1 | sort -u | xargs <ret>'
-map global selectionmode -docstring 'sort words (V)ertically in selection ' v '| sort -n  <ret>'
+declare-user-mode selmode
+map global selmode -docstring 'clean tabs and trailing whitespaces'     c ': clean-selections<ret>'
+map global selmode -docstring 'sort words (H)orizontally in selection ' h '| xargs -n1 | sort -u | xargs <ret>'
+map global selmode -docstring 'sort words (V)ertically in selection '   v '| sort -n  <ret>'
 
 # terminal config (via foot.kak)
 # ──────────────────────────────────────────────────────────────────────────────
diff --git a/config/kak/plugins/bookmarks.kak b/config/kak/plugins/bookmarks.kak
deleted file mode 160000 (submodule)
index 2e92602..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2e92602eef5ed1717660689765b93583eecce099
diff --git a/config/kak/plugins/dabruin.kak b/config/kak/plugins/dabruin.kak
deleted file mode 160000 (submodule)
index f1cc1b1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f1cc1b1cfea2a412cd0230e2dc3f2a1140eac4a2
diff --git a/config/kak/plugins/foot.kak b/config/kak/plugins/foot.kak
deleted file mode 160000 (submodule)
index 406cbad..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 406cbaddb7daaeb33a308557b4faf94697bcc91a
diff --git a/config/kak/plugins/kak-harpoon b/config/kak/plugins/kak-harpoon
deleted file mode 160000 (submodule)
index a6d7bd6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a6d7bd6a380a8591d00b6d55595f3fdbd2e65cd5
diff --git a/config/kak/plugins/kakoune-find b/config/kak/plugins/kakoune-find
deleted file mode 160000 (submodule)
index 09afcc8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 09afcc8520d4c92928fe69da4c370b9979aa90d3
diff --git a/config/kak/plugins/kakoune-sudo-write b/config/kak/plugins/kakoune-sudo-write
deleted file mode 160000 (submodule)
index ec0d6d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ec0d6d26ceaadd93d6824630ba587b31e442214d
diff --git a/config/kak/plugins/kakship b/config/kak/plugins/kakship
deleted file mode 160000 (submodule)
index c58d592..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c58d592051d65d004129185c5f0bb48c11a63801
diff --git a/config/kak/plugins/plug.kak b/config/kak/plugins/plug.kak
deleted file mode 160000 (submodule)
index f28b3fb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f28b3fb88fbc77d69b1027780cb9a16b0bd7fc76
diff --git a/config/kak/plugins/smarttab.kak b/config/kak/plugins/smarttab.kak
deleted file mode 160000 (submodule)
index 86ac659..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 86ac6599b13617ff938905ba4cdd8225d7eb6a2e
index 5a61b3deef8b03eb3320301799d1b955ad9f387c..a699d8e5bae24436a8a39e06aed8b0dc9b51e92a 100644 (file)
@@ -111,7 +111,7 @@ disabled = false
 format = "[ $symbol$percentage]($style) "
 charging_symbol = ' '
 discharging_symbol = ' '
-disabled = true
+disabled = false
 
 [[battery.display]]
 threshold = 10
@@ -194,12 +194,12 @@ format = '[]($style)[  %val{client}:%val{session} ]($style)[]($style in
 style = 'bg:yellow fg:black italic'
 when = ''
 shell = ['true']
-disabled = false
+disabled = true
 
 [custom.kakcursor]
 description = 'The current Kakoune cursor position'
 format = '[%val{cursor_line}:%val{cursor_char_column}]($style)'
-style = 'fg:white'
+style = 'fg:bright-white'
 when = ''
 shell = ['true']
 disabled = false
@@ -248,7 +248,7 @@ format = "[  %opt{lsp_diagnostic_error_count}]($style)"
 style = "red bold"
 when = '[ -n "$kak_opt_lsp_diagnostic_error_count" -a "$kak_opt_lsp_diagnostic_error_count" -ne 0 ]'
 shell = ['sh']
-disabled = true
+disabled = false
 
 [custom.kaklsp_warn]
 description = "Show warnings number from kak-lsp if any"
@@ -256,7 +256,7 @@ format = "[  %opt{lsp_diagnostic_warning_count}]($style)"
 style = "yellow bold"
 when = '[ -n "$kak_opt_lsp_diagnostic_warning_count" -a "$kak_opt_lsp_diagnostic_warning_count" -ne 0 ]'
 shell = ['sh']
-disabled = true
+disabled = false
 
 [custom.kaklsp_hint]
 description = "Show hints number from kak-lsp if any"
@@ -264,7 +264,7 @@ format = "[ ﯦ %opt{lsp_diagnostic_hint_count}]($style)"
 style = "white bold"
 when = '[ -n "$kak_opt_lsp_diagnostic_hint_count" -a "$kak_opt_lsp_diagnostic_hint_count" -ne 0 ]'
 shell = ['sh']
-disabled = true
+disabled = false
 
 [custom.kaklsp_code_actions]
 description = "Show lsp code actions"
@@ -280,4 +280,4 @@ format = "[ ]($style)"
 style = "bright-white bold"
 when = '[ -n "$kak_opt_lsp_modeline_progress" ]'
 shell = ['sh']
-disabled = true
+disabled = false