aboutsummaryrefslogtreecommitdiff
path: root/autoload/+init.kak
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-10-14 00:36:11 +0530
committerAkshay Nair <phenax5@gmail.com>2025-10-21 13:39:45 +0530
commit2fa61e7942d899c7d883d3f5a82e7623740ebb6b (patch)
tree31e6d480ade2502438dcb280e7c9d9106cb4b213 /autoload/+init.kak
parent5d9a6f0f97d5e0d451a56a94e6e6616b4c8c3a40 (diff)
downloadkakoune-config-2fa61e7942d899c7d883d3f5a82e7623740ebb6b.tar.gz
kakoune-config-2fa61e7942d899c7d883d3f5a82e7623740ebb6b.zip
Add luar
Diffstat (limited to 'autoload/+init.kak')
-rw-r--r--autoload/+init.kak28
1 files changed, 17 insertions, 11 deletions
diff --git a/autoload/+init.kak b/autoload/+init.kak
index 66374c4..3857043 100644
--- a/autoload/+init.kak
+++ b/autoload/+init.kak
@@ -3,6 +3,11 @@ nop %sh{ ln -s "$kak_runtime/rc" "$kak_config/autoload/standard-library" 2>/dev/
# evaluate-commands %sh{kak-tree-sitter -dksvv --init "${kak_session}"}
evaluate-commands %sh{kcr init kakoune}
+hook global KakBegin .* %{
+ require-module luar
+ set-option global luar_interpreter luajit
+}
+
colorscheme phenax
set-option global autoreload yes
set-option global incsearch true
@@ -13,8 +18,8 @@ set-option global startup_info_version 20250603
set-option global scrolloff 10,3
set-option global makecmd 'make -j8' # Override for others
set-option -add global ui_options \
- terminal_assistant=none \
terminal_enable_mouse=false
+ # terminal_assistant=none \
set-option global modelinefmt \
'{StatusLineDetails}{{context_info}} {{mode_info}}
%val{cursor_line}/%val{buf_line_count}:%val{cursor_char_column}
@@ -31,7 +36,7 @@ add-highlighter global/ show-matching -previous
# Search
hook global RegisterModified '/' %{ add-highlighter -override global/search regex "%reg{/}" 0:search }
-map global user '<esc>' ':set-register slash ""<ret>'
+map global user '<esc>' ': set-register slash ""<ret>'
map global user '/' '/(?i)'
map global user 'r' '*%s<ret>'
@@ -57,20 +62,20 @@ hook global ModeChange .*:insert:.* %{ try %{
# Tmux window mode
declare-user-mode win
map global normal <c-w> ':enter-user-mode win<ret>' -docstring 'Window mode'
-map global win q ':quit<ret>' -docstring 'Quit'
-map global win v ':tmux-terminal-horizontal kak -c %val{session}<ret>' -docstring 'Split vertical'
-map global win s ':tmux-terminal-vertical kak -c %val{session}<ret>' -docstring 'Split horizontal'
-map global win h ':nop %sh{tmux select-pane -L}<ret>' -docstring 'Jump left'
-map global win j ':nop %sh{tmux select-pane -D}<ret>' -docstring 'Jump down'
-map global win k ':nop %sh{tmux select-pane -U}<ret>' -docstring 'Jump up'
-map global win l ':nop %sh{tmux select-pane -R}<ret>' -docstring 'Jump right'
-map global win z ':wq<ret>'
-
+map global win q ': quit<ret>' -docstring 'Quit'
+map global win v ': tmux-terminal-horizontal kak -c %val{session}<ret>' -docstring 'Split vertical'
+map global win s ': tmux-terminal-vertical kak -c %val{session}<ret>' -docstring 'Split horizontal'
+map global win h ': nop %sh{tmux select-pane -L}<ret>' -docstring 'Jump left'
+map global win j ': nop %sh{tmux select-pane -D}<ret>' -docstring 'Jump down'
+map global win k ': nop %sh{tmux select-pane -U}<ret>' -docstring 'Jump up'
+map global win l ': nop %sh{tmux select-pane -R}<ret>' -docstring 'Jump right'
+map global win z ': wq<ret>'
# Clipboard management mappings
map global user y "<a-|> xclip -selection clipboard<ret>" -docstring "yank the selection into the clipboard"
map global user p "<a-!> xclip -selection clipboard -o<ret>" -docstring "paste the clipboard"
+# Code mode
declare-user-mode code
map global user c ':enter-user-mode code<ret>' -docstring 'Code mode'
map global code c :comment-line<ret> -docstring 'Comment/uncomment lines'
@@ -81,6 +86,7 @@ map global code <a-k> :casekebab<ret> -docstring 'kebab-casing'
map global code <a-_> :casesnake<ret> -docstring 'snake_casing'
map global code <a-c> :casecamel<ret> -docstring 'camelCasing'
+# Quick move
map global normal <c-j> 15j
map global normal <c-k> 15k