summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-09-20 19:11:00 +0300
committerMarc Coquand <marc@mccd.space>2024-09-20 19:11:00 +0300
commitb2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab (patch)
treeace0ee0d7acf2af94839e893d8a3a7e514e185c9 /config
parente233e7f028366ce8f5d58fe1cc8a88210664ddb3 (diff)
downloadbsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.tar.gz
bsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.tar.bz2
bsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.zip
.
Diffstat (limited to '')
-rw-r--r--config/aerc/accounts.conf4
-rw-r--r--config/kak/kakrc19
2 files changed, 18 insertions, 5 deletions
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 '<esc>: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 <a-i>c<gt>,<lt><ret> } -docstring "Select content within angle bracket"
# --- KEYMAPS
map global user = ':lsp-formatting<ret>' -docstring "LSP Format"
map global user w '|fmt <ret>' -docstring "Wrap to 80 columns"
map global user l %{:enter-user-mode lsp<ret>} -docstring "LSP mode"
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
-map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
+map global object l '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
+map global object a '<a-semicolon>select-angle-bracket<ret>' -docstring 'XML Tag'
map global object e '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
map global object k '<a-semicolon>lsp-object Class Interface Struct<ret>' -docstring 'LSP class interface or struct'
map global object d '<a-semicolon>lsp-diagnostic-object --include-warnings<ret>' -docstring 'LSP errors and warnings'
@@ -87,6 +94,7 @@ map global user k ':lsp-hover<ret>' -docstring 'LSP errors'
map global normal \' ":"
map global insert <a-k> "<a-;>:lsp-signature-help<ret>"
map global user m ':make<ret>' -docstring "Run make"
+map global normal + ":expand<ret>"
# --- 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