added .kakrc to manage cwd in editor

This commit is contained in:
Daniel Fichtinger 2025-07-15 15:09:23 -04:00
parent f72142fff3
commit c6dd2785af

21
.kakrc Normal file
View file

@ -0,0 +1,21 @@
# commands to edit important files in the root
declare-option str project_root %sh{ git rev-parse --show-toplevel }
define-command -params 1 root-edit %{
edit %exp{%opt{project_root}/%arg{1}}
}
define-command just %{
root-edit justfile
}
define-command pyproject %{
root-edit pyproject.toml
}
define-command readme %{
root-edit README.md
}
# change working directory to the package
hook global -once BufCreate .* %{
change-directory %exp{%opt{project_root}/src/zona}
}