Some more small kak setups

- Add kakoune-focus
- Fix some kakrc comments
This commit is contained in:
Natsu Kagami 2022-07-07 15:17:14 -04:00 committed by Natsu Kagami
parent d0e5f73def
commit 63283d0a51
3 changed files with 23 additions and 7 deletions

View file

@ -9,7 +9,7 @@ map -docstring "Toggle the checkboxes on the same line" global markdown-menu t "
define-command -hidden markdown-toggle-checkbox %{ define-command -hidden markdown-toggle-checkbox %{
try %{ try %{
execute-keys -draft "<a-x>s^\s*- \[( |x)\]<ret>h: markdown-toggle-checkbox-selections<ret>" execute-keys -draft "xs^\s*- \[( |x)\]<ret>h: markdown-toggle-checkbox-selections<ret>"
} }
} }

View file

@ -158,6 +158,7 @@ in
kak.edit(file, line) kak.edit(file, line)
} }
} }
}
# A peneira menu # A peneira menu
declare-user-mode fuzzy-match-menu declare-user-mode fuzzy-match-menu
@ -173,6 +174,21 @@ in
map -docstring "Fuzzy matching" global user f ": enter-user-mode fuzzy-match-menu<ret>" map -docstring "Fuzzy matching" global user f ": enter-user-mode fuzzy-match-menu<ret>"
''; '';
} }
{
name = "01-kakoune-focus";
src = pkgs.fetchFromGitHub {
owner = "caksoylar";
repo = "kakoune-focus";
rev = "949c0557cd4c476822acfa026ca3c50f3d38a3c0";
sha256 = "sha256-ZV7jlLJQyL420YG++iC9rq1SMjo3WO5hR9KVvJNUiCs=";
};
}
{
name = "02-kakoune-focus-config.kak";
src = activationScript ''
map global user <space> ': focus-toggle<ret>' -docstring "toggle selections focus"
'';
}
{ {
name = "01-cargo.kak"; name = "01-cargo.kak";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {

View file

@ -64,12 +64,12 @@ define-command -params 0 -docstring "Copy line down" copyline %{
execute-keys -draft 'xy'%val{count}'P' execute-keys -draft 'xy'%val{count}'P'
} }
map global normal <+> -docstring "Copy line down" ': copyline<ret>' map global normal <+> -docstring "Copy line down" ': copyline<ret>'
define-command -params 0 -docstring "Delete current character" delete-one %{ define-command -params 0 -docstring "Delete current pair of brackets" delete-current-brackets %{
execute-keys 'm<a-:>' execute-keys 'm<a-:>'
execute-keys -draft '<a-S>d' execute-keys -draft '<a-S>d'
execute-keys 'H' execute-keys 'H'
} }
map global normal D ": delete-one<ret>" map global normal D ": delete-current-brackets<ret>"
# Disable write-to # Disable write-to
# unalias global w # unalias global w
@ -125,7 +125,7 @@ hook global WinSetOption filetype=(rust) %{
lsp-inlay-hints-enable window lsp-inlay-hints-enable window
} }
hook global WinSetOption filetype=(rust|go|fsharp) %{ hook global WinSetOption filetype=(rust|go|fsharp|haskell) %{
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens