From b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Fri, 20 Sep 2024 19:11:00 +0300 Subject: . --- config/aerc/accounts.conf | 4 ++-- config/kak/kakrc | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/aerc/accounts.conf b/config/aerc/accounts.conf index f104d32..d81b5b5 100644 --- a/config/aerc/accounts.conf +++ b/config/aerc/accounts.conf @@ -1,5 +1,5 @@ [Personal] -source = maildir://~/mail-home +source = maildir://~/mail/home outgoing = smtps+plain://marcc%40fastmail.fr@smtp.fastmail.com:465 default = INBOX outgoing-cred-cmd = pass fastmail/marcc @@ -8,7 +8,7 @@ address-book-cmd = grep -F -i -- "%s" "/home/mccd/.local/share/maildir2addr/add copy-to = Sent [Work] -source = maildir://~/mail-work +source = maildir://~/mail/work outgoing = smtps+plain://marc.coquand%40sustainably.app@smtp.gmail.com:465 default = INBOX outgoing-cred-cmd = pass sustainably/gmail diff --git a/config/kak/kakrc b/config/kak/kakrc index 6966eec..895be8f 100644 --- a/config/kak/kakrc +++ b/config/kak/kakrc @@ -4,6 +4,7 @@ source "~/.config/kak/palette.kak" source "~/.config/kak/auto-pairs.kak" source "~/.config/kak/snippets.kak" source "~/.config/kak/phantom-selection.kak" +source "~/.config/kak/expand-region.kak" # --- Auto pairs enable-auto-pairs @@ -20,6 +21,10 @@ hook global WinSetOption filetype=(rust|python|nim|go|javascript|typescript|c|cp lsp-enable-window lsp-auto-hover-insert-mode-enable } +hook global BufCreate .*\.(njk|tmpl) %{ set buffer filetype html } +hook global WinSetOption filetype=(html) %{ + set-option buffer tabstop 2 +} hook global WinSetOption filetype=(eml|markdown|org) %{ spell } @@ -36,7 +41,7 @@ hook global BufSetOption filetype=(javascript|typescript|elixir|haskell|rust|mar lsp-auto-signature-help-enable } -hook global BufSetOption filetype=(terraform|ocaml|elixir|nix|go) %{ +hook global BufSetOption filetype=(terraform|ocaml|elixir|nix) %{ hook buffer BufWritePre .* %{lsp-formatting-sync} } @@ -70,14 +75,16 @@ map global goto f ':prompt -menu -shell-script-candidates %{ fd -t f } fd: define-command z -docstring "Change Directory (Z)" -params 1 %{ change-directory %sh{zoxide query $1} } complete-command z shell-script-candidates %{ zoxide query -l } +define-command select-angle-bracket %{ execute-keys c, } -docstring "Select content within angle bracket" # --- KEYMAPS map global user = ':lsp-formatting' -docstring "LSP Format" map global user w '|fmt ' -docstring "Wrap to 80 columns" map global user l %{:enter-user-mode lsp} -docstring "LSP mode" map global insert ':try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks tab> }' -docstring 'Select next snippet placeholder' -map global object a 'lsp-object' -docstring 'LSP any symbol' +map global object l 'lsp-object' -docstring 'LSP any symbol' map global object 'lsp-object' -docstring 'LSP any symbol' +map global object a 'select-angle-bracket' -docstring 'XML Tag' map global object e 'lsp-object Function Method' -docstring 'LSP function or method' map global object k 'lsp-object Class Interface Struct' -docstring 'LSP class interface or struct' map global object d 'lsp-diagnostic-object --include-warnings' -docstring 'LSP errors and warnings' @@ -87,6 +94,7 @@ map global user k ':lsp-hover' -docstring 'LSP errors' map global normal \' ":" map global insert ":lsp-signature-help" map global user m ':make' -docstring "Run make" +map global normal + ":expand" # --- Hunks declare-user-mode hunk @@ -150,7 +158,7 @@ define-command conflict-use-2 %{ map global conflict-resolve a conflict-use-1 -docstring "resolve conflict using first version" map global conflict-resolve b conflict-use-2 -docstring "resolve conflict using second version" -# --- VISUAL +# --- VISUAL / THEME colorscheme simple @@ -162,6 +170,11 @@ hook global ModeChange (push|pop):.*:insert %{ set-face global PrimaryCursor default,default+Bc } +# Show TODO comments +hook -group todohighlight global BufCreate .* %{ + add-highlighter buffer/todo-highlight regex "%opt{comment_line}[ \t]*\b(TODO|XXX|FIXME|MAYBE)\b" 1:default+bu@comment +} + # Width of a tab set-option global tabstop 8 -- cgit v1.2.3