AutoYADM commit: 2025-07-11 17:01:31
This commit is contained in:
parent
6b7c794136
commit
c5fe1d3d91
6 changed files with 30 additions and 19 deletions
|
@ -153,8 +153,8 @@ hook global WinSetOption filetype=man %{
|
||||||
|
|
||||||
hook global WinSetOption filetype=kdl %{
|
hook global WinSetOption filetype=kdl %{
|
||||||
set-option window formatcmd "kdlfmt format -"
|
set-option window formatcmd "kdlfmt format -"
|
||||||
hook -group kdl-auto-format window BufWritePre .* format
|
hook -group kdl-auto-format window BufWritePre .* %{ try format }
|
||||||
hook -once -always WinSetOption filetype=.* %{
|
hook -once -always window WinSetOption filetype=.* %{
|
||||||
unset-option window formatcmd
|
unset-option window formatcmd
|
||||||
remove-hooks window kdl-auto-format
|
remove-hooks window kdl-auto-format
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,3 @@ define-command ide %{
|
||||||
# set global toolsclient tools
|
# set global toolsclient tools
|
||||||
}
|
}
|
||||||
|
|
||||||
# project-specific configuration
|
|
||||||
hook global BufCreate (.*/)?(\.kakrc\.local|\.kakrc\.local|\.kakrc) %{
|
|
||||||
set-option buffer filetype kak
|
|
||||||
}
|
|
||||||
try %{ source .kakrc } catch %{
|
|
||||||
try %{ source .kakrc.local } catch %{ try %{ source .local.kakrc } }
|
|
||||||
}
|
|
||||||
|
|
5
.config/kak/autoload/repl.kak
Normal file
5
.config/kak/autoload/repl.kak
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
provide-module repl %∴
|
||||||
|
define-command repl %{
|
||||||
|
new %{ edit -scratch; set buffer filetype kak }
|
||||||
|
}
|
||||||
|
∴
|
15
.config/kak/autoload/root.kak
Normal file
15
.config/kak/autoload/root.kak
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
provide-module root %∴
|
||||||
|
declare-option str-list root_globs .git .kakrc kakrc
|
||||||
|
# project-specific configuration
|
||||||
|
hook global BufCreate (.*/)?(\.kakrc\.local|\.kakrc\.local|\.kakrc) %{
|
||||||
|
set-option buffer filetype kak
|
||||||
|
}
|
||||||
|
try %{ source .kakrc } catch %{
|
||||||
|
try %{ source .kakrc.local } catch %{ try %{ source .local.kakrc } }
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global KakBegin .* %{
|
||||||
|
# discover project root
|
||||||
|
}
|
||||||
|
|
||||||
|
∴
|
|
@ -18,6 +18,7 @@ define-command -override false fail
|
||||||
require-module ui-mode
|
require-module ui-mode
|
||||||
require-module colemak
|
require-module colemak
|
||||||
require-module clipboard
|
require-module clipboard
|
||||||
|
require-module root
|
||||||
|
|
||||||
try %{
|
try %{
|
||||||
%opt{on_server}
|
%opt{on_server}
|
||||||
|
@ -171,9 +172,7 @@ define-command exec-selection %{
|
||||||
|
|
||||||
map -docstring 'execute selection' global kak x ': exec-selection<ret>'
|
map -docstring 'execute selection' global kak x ': exec-selection<ret>'
|
||||||
|
|
||||||
define-command repl %{
|
require-module repl
|
||||||
new %{ edit -scratch; set buffer filetype kak }
|
|
||||||
}
|
|
||||||
|
|
||||||
# jumplist
|
# jumplist
|
||||||
|
|
||||||
|
@ -187,12 +186,12 @@ map -docstring 'add selection' global normal Y <a-Z>a
|
||||||
require-module url-open
|
require-module url-open
|
||||||
map -docstring "Open URL" global goto u '<esc>: url-open<ret>'
|
map -docstring "Open URL" global goto u '<esc>: url-open<ret>'
|
||||||
|
|
||||||
|
# apply and validate niri config
|
||||||
hook global BufWritePost .*/\.config/niri/.*\.kdl(##.+)? %{
|
hook global BufWritePost .*/\.config/niri/.*\.kdl(##.+)? %{
|
||||||
try %{
|
eval %sh{
|
||||||
nop %sh{
|
yadm alt >/dev/null
|
||||||
yadm alt >/dev/null
|
if ! niri validate >/dev/null; then
|
||||||
}
|
echo 'info "Error in niri config, check *debug*"'
|
||||||
} catch %{
|
fi
|
||||||
fail gamer sippy
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
gamer sauce
|
|
||||||
input {
|
input {
|
||||||
keyboard {
|
keyboard {
|
||||||
xkb {
|
xkb {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue