From 8e6fa2062700d8c4816e8ecd95940805bedc245b Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 18 Jan 2026 16:34:31 +0530 Subject: Add plugins directory linking --- autoload/+init.kak | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'autoload/+init.kak') diff --git a/autoload/+init.kak b/autoload/+init.kak index 8044ad7..5169932 100644 --- a/autoload/+init.kak +++ b/autoload/+init.kak @@ -1,12 +1,9 @@ # Link builtin autoloads nop %sh{ + rm -f "$kak_config/autoload/standard-library" || true + rm -f "$kak_config/autoload/plugins" || true ln -sf "$kak_runtime/rc" "$kak_config/autoload/standard-library" 2>/dev/null || true - # rm -rf "$kak_config/autoload/stdlib" 2>/dev/null || true - # mkdir -p "$kak_config/autoload/stdlib" || true - # ln -sf "$kak_runtime/rc/detection" "$kak_config/autoload/stdlib/detection" 2>/dev/null || true - # ln -sf "$kak_runtime/rc/filetype" "$kak_config/autoload/stdlib/filetype" 2>/dev/null || true - # ln -sf "$kak_runtime/rc/tools" "$kak_config/autoload/stdlib/tools" 2>/dev/null || true - # ln -sf "$kak_runtime/rc/windowing" "$kak_config/autoload/stdlib/windowing" 2>/dev/null || true + ln -sf "$kak_runtime/autoload/plugins" "$kak_config/autoload/plugins" 2>/dev/null || true } # Disable indent trimming @@ -15,12 +12,6 @@ set-option global disabled_hooks .*-trim-indent eval %sh{kak-tree-sitter -dksvv --init "${kak_session}" --with-highlighting --with-text-objects} eval %sh{kcr init kakoune} -# hook global BufCreate .*[.]tsx %{ -# set-option buffer filetype tsx -# set-option buffer tree_sitter_lang tsx -# set-option buffer lsp_language_id typescriptreact -# } - colorscheme phenax set-option global autoreload yes set-option global incsearch true @@ -49,11 +40,11 @@ add-highlighter global/ regex \h+$ 0:Error # Highlight trailing whitespaces add-highlighter global/ show-matching -previous add-highlighter global/ show-whitespaces -spc ' ' -tab '│' -lf '¬' -indent '│' hook global RegisterModified '/' %{ - # @todo: Highlight current searchterm - # TODO: Highlight current searchterm + # Highlight search add-highlighter -override global/search regex "%reg{/}" 0:search } -add-highlighter global/ regex \b(TODO|FIXME|@todo|@fixme)\b 0:default+rb +add-highlighter global/ regex \b(TODO|FIXME)\b 0:default+rb +add-highlighter global/ regex @(todo|fixme) 0:default+rb # Misc keys map global user '' ': set-register slash ""' -docstring 'Clear search highlighting' @@ -64,16 +55,18 @@ map global normal 15j -docstring '15 down' map global normal 15k -docstring '15 up' map global user y " xclip -selection clipboard" -docstring "yank the selection into the clipboard" -map global user p " xclip -selection clipboard -o" -docstring "paste the clipboard" declare-user-mode system map global user q ': enter-user-mode system' -docstring 'System mode' -map global system o ':echo %opt{}' -docstring 'Print opt' -map global system v ':echo %val{}' -docstring 'Print value' +map global system o ':info %opt{}' -docstring 'Print opt' +map global system v ':info %val{}' -docstring 'Print value' map global system d ': buffer *debug*' -docstring 'Switch to debug buffer' map global system f ':set buffer filetype ' -docstring 'Set filetype' -map global system m ':set buffer makecmd ""' -docstring 'Set compile command' +map global system M ':set buffer makecmd ""' -docstring 'Set compile command' +map global system m ': make' -docstring 'Compile' map global system p ': info %val{buffile}' -docstring 'Print file path' +map global system ! ':info %sh{}' -docstring 'Run command' +map global system t ': terminal %sh{ echo "$SHELL" }' -docstring 'Open new term' # Wrapping set-option global autowrap_column 100 @@ -112,5 +105,5 @@ map global ai ! '!ai ""' -docstring 'Insert output' map global ai | '|ai ""' -docstring 'Replace output' # Editorconfig -hook global WinCreate ^[^*]+$ %{editorconfig-load} +hook global WinCreate ^[^*]+$ %{ editorconfig-load } -- cgit v1.3.1