aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--autoload/+init.kak28
m---------autoload/luar0
3 files changed, 20 insertions, 11 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..bd8486d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "autoload/luar"]
+ path = autoload/luar
+ url = git@github.com:gustavo-hms/luar.git
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
diff --git a/autoload/luar b/autoload/luar
new file mode 160000
+Subproject e32ac89fdc43e5dbd8750d55cbcf1aea66d3ebd