commit 126c7faea8779c5e0dff2c0657ec2864a450a54d Author: Kankys Date: Sat Mar 30 15:32:15 2024 +0000 Přidat kakrc diff --git a/kakrc b/kakrc new file mode 100644 index 0000000..9236315 --- /dev/null +++ b/kakrc @@ -0,0 +1,125 @@ +# Přidá řádkování +add-highlighter global/ number-lines; + +# Zvýraznění závorek +add-highlighter global/ show-matching + +# Comment lines -> Ctrl + k (c= kolize) +map global normal ":comment-line" + +# colorscheme +colorscheme gruvbox-dark + +# Autosave s upozorněním +define-command save-buffer -docstring "save current buffer and show info" %{ + write + info "file saved at %sh{date}" +} +hook global ModeChange pop:insert:.* %{ + save-buffer +} + +# FZF na space + f a další +map -docstring "open fzf" global user f ": fzf-mode" + + +# Nastavení potvrzování TAB +hook global InsertCompletionShow .* %{ + map window insert + map window insert + +} +hook global InsertCompletionHide .* %{ + unmap window insert + unmap window insert +} + + +# Zalamování markdown +hook global WinSetOption filetype=markdown %{ + add-highlighter -override global/markdown-wrap wrap -word + + hook -once -always window WinSetOption filetype=.* %{ + remove-highlighter global/markdown-wrap + } +} + +# Změna nebo vypnutí clippyho -> clippy, dilbert, cat, a none. +set-option global ui_options terminal_assistant=cat + + + +eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak. +lsp-enable + +# Instalace pluginu +source "%val{config}/plugins/plug.kak/rc/plug.kak" +plug "andreyorst/plug.kak" noload + +plug "andreyorst/fzf.kak"config %{ + require-module fzf + require-module fzf-grep + require-module fzf-file +} defer fzf %{ + set-option global fzf_highlight_command "lat -r {}" +} defer fzf-file %{ + set-option global fzf_file_command "fd . --no-ignore-vcs" +} defer fzf-grep %{ + set-option global fzf_grep_command "fd": +} + +# plug "andreyorst/powerline.kak" defer kakoune-themes %{ +# powerline-theme gruvbox-dark +# } # defer powerline %{ + # powerline-format global "git lsp bufname filetype mode_info lsp line_column position" + # set-option global powerline_separator_thin "" + # set-option global powerline_separator "" +# } +# config %{ +# powerline-start +# } + + + +# Automatické doplňění protější závorky +plug "alexherbo2/auto-pairs.kak" config %{ + enable-auto-pairs +} + +#plug "kakoune-lsp/kakoune-lsp" do %{ + # cargo install --locked --force --path . + # optional: if you want to use specific language servers + # mkdir -p ~/.config/kak-lsp + # cp -n kak-lsp.toml ~/.config/kak-lsp/ + # } + + plug "ul/kak-lsp" do %{ + cargo install --locked --force --path . +} config %{ + hook global WinSetOption filetype=(jsx|tsx|typescript|javascript) %{ + lsp-enable-window + lsp-auto-hover-disable + lsp-auto-signature-help-enable + # I format directly with prettier, but you could also configure the + # formatter option of your LSP and then call it with: + # hook window BufWritePre .* lsp-formatting-sync + set-option window formatcmd "prettier --stdin-filepath _.tsx" + set-option window indentwidth 2 + hook window BufWritePre .* format + } +} + +# Vybere pomocí x celý řádek jako v Helix-editor +plug "evanrelf/byline.kak" config %{ + require-module "byline" +} + +# Dovolí instalovat pluginy v Lua +plug "gustavo-hms/luar" %{ + require-module luar +} + +# themes +plug "secondary-smiles/kakoune-themes" theme config %{ + colorscheme gruvbox-dark + }