adding vim back. helix tweaking. adding mu4e

This commit is contained in:
Dustin Swan 2022-01-28 12:28:52 -05:00
parent 011c37d72c
commit 745a4c1f96
No known key found for this signature in database
GPG key ID: AB49BD6B2B3A6377
3 changed files with 177 additions and 162 deletions

View file

@ -38,6 +38,15 @@
(setq calendar-week-start-day 1) (setq calendar-week-start-day 1)
(setq calendar-day-header-array ["" "" "" "" "" "" ""]) (setq calendar-day-header-array ["" "" "" "" "" "" ""])
(set-email-account! "FastMail"
'((mu4e-sent-folder . "/FastMail/Sent")
(mu4e-drafts-folder . "/FastMail/Drafts")
(mu4e-trash-folder . "/FastMail/Trash")
(mu4e-refile-folder . "/FastMail/Archive")
(smtpmail-smtp-user . "dustin@dustinswan.com"))
; (user-mail-address . "dustin@dustinswan.com") ;; only needed for mu < 1.4
t)
;; Here are some additional functions/macros that could help you configure Doom: ;; Here are some additional functions/macros that could help you configure Doom:
;; ;;
;; - `load!' for loading external *.el files relative to this one ;; - `load!' for loading external *.el files relative to this one

View file

@ -172,7 +172,7 @@
;;zig ; C, but simpler ;;zig ; C, but simpler
:email :email
;;(mu4e +org +gmail) (mu4e +org)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)

View file

@ -5,7 +5,7 @@ let
in in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
helix ripgrep fd wget mosh w3m nnn urlview gnupg hexyl httpie catimg tealdeer du-dust duplicati bitwarden-cli rage sd eva glow restic tig gitui spotify-tui manix amfora weechat duf procs pandoc magic-wormhole pastel fx ripgrep fd wget mosh w3m nnn urlview gnupg hexyl httpie catimg tealdeer du-dust duplicati bitwarden-cli rage sd eva glow restic tig gitui spotify-tui manix amfora weechat duf procs pandoc magic-wormhole pastel fx
nodejs deno yarn nodePackages.stylelint nodePackages.js-beautify nodejs deno yarn nodePackages.stylelint nodePackages.js-beautify
ocaml dune_2 ocamlPackages.utop ocamlPackages.ocp-indent ocamlPackages.merlin ocaml dune_2 ocamlPackages.utop ocamlPackages.ocp-indent ocamlPackages.merlin
# racket-minimal # racket-minimal
@ -41,7 +41,7 @@ in
fzf-tmux-url # prefix u -> fzf urls fzf-tmux-url # prefix u -> fzf urls
yank # prefix y -> copy command line to clipboard; prefix Y -> copy pwd to clipboard; search + y -> copy to clipboard yank # prefix y -> copy command line to clipboard; prefix Y -> copy pwd to clipboard; search + y -> copy to clipboard
open # highlight: o -> open; ctrl-o -> $EDITOR; S -> web search open # highlight: o -> open; ctrl-o -> $EDITOR; S -> web search
vim-tmux-navigator # ctrl-h, -j, -k, -l -> move between tmux and vim splits # vim-tmux-navigator # ctrl-h, -j, -k, -l -> move between tmux and vim splits # TODO doesn't work with helix
copycat # prefix ctrl-/ -> regex search; ctrl-f -> file search; ctrl-u -> url search; etc. copycat # prefix ctrl-/ -> regex search; ctrl-f -> file search; ctrl-u -> url search; etc.
]; ];
extraConfig = '' extraConfig = ''
@ -79,7 +79,6 @@ in
h = "himalaya"; h = "himalaya";
er = "rm -rf logs; unzip -o"; er = "rm -rf logs; unzip -o";
srsync = "rsync --rsync-path='sudo rsync'"; srsync = "rsync --rsync-path='sudo rsync'";
vim = "echo NO";
}; };
}; };
@ -153,172 +152,184 @@ in
package = ((pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ epkgs.vterm ])); package = ((pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ epkgs.vterm ]));
}; };
# programs.neovim = { programs.helix = {
# enable = true; enable = true;
# viAlias = true; settings = {
# vimAlias = true; theme = "nord";
# vimdiffAlias = true; lsp.display-messages = true;
# withNodeJs = true; keys.normal = {
# withPython3 = true; C-h = "jump_view_left";
# coc = { C-l = "jump_view_right";
# enable = true; };
# settings = '' };
# { };
# "tsserver.formatOnType": true,
# "coc.preferences.formatOnType": true
# }
# '';
# };
# plugins = with pkgs.vimPlugins; [ # ale
# vim-repeat vim-snippets vim-signify vim-orgmode vim-devicons vim-startify vim-highlightedyank
# emmet-vim # <ctrl-y>,
# vim-signature # marks in the gutter; mx (add), dmx (delete), m, (place next available), m. (next available if empty), m- (delete all on line), m<space> (delete all)
# vim-expand-region # + / - to select increasingly larger / smaller regions∑
# vim-better-whitespace # :StripWhitespace
# vim-peekaboo # see registers when doing " @ and ctrl-r
# vim-abolish # Substitution: :Subvert/child{,ren}/adult{,s}/g Coercios: crs (coerce to snake-case), crm (mixed), crc (camel), cru (upper), cr- (dash), cr., cr<space>, crt (title-case)
# vim-polyglot # includes sensible, dups vim-sleuth
# argtextobj-vim # daa => delete an argument
# splitjoin-vim # gS / gJ to turn single-line code into multi, etc.
# MatchTagAlways # highlights the matching & surrounding tags
# vim-visual-multi # ctrl-n on word, n/N to select next/prev, [/] to switch cursors, q to skip, Q to remove current
# # vim-endwise # automatically add end block keyword or symbol
# vim-fugitive # Git, Gdiff, Gblame, Gstatus, Gcommit
# vim-speeddating # ctrl-a & ctrl-x on dates
# jdaddy-vim # cij: change inner json. gqaj: pretty print json
# vim-surround # cs[{ -> change surrounding [ to {, cst -> change surrounding tag, ysiw] -> surround inner word with ], etc.
# vim-tmux-navigator # ctrl-l -> right in vim splits then tmux panes, etc.
# vim-sneak # stp -> jump to next occurance of 'tp'. ; -> next. , -> go back, `` -> back home
# fzf-vim
# vim-table-mode # <space>tm, || for rule, <space>tt -> tableize csv
# tabular # :Tabularize /, :Tabu (shortcut & guess the right thing)
# vim-markdown # zr, zR, zm, zM, za, zA, zc, zC for folding
# vim-gnupg
# vim-floaterm # <leader>T
# undotree # <leader>u
# vim-which-key
# coc-nvim coc-css coc-html coc-eslint coc-tsserver coc-json coc-fzf coc-snippets
# {
# plugin = chadtree; # nvim-tree-lua
# config = "let g:chadtree_settings = { 'xdg': v:true }";
# }
# {
# plugin = vim-easy-align; # gaip= -> align inner paragraph on first =, gaip*= -> align aroud all =
# config = ''
# xmap ga <Plug>(EasyAlign)
# nmap ga <Plug>(EasyAlign)
# '';
# }
# {
# plugin = vim-easymotion; # <leader><leader> w, <leader><leader>fx -> find x
# config = "let g:EasyMotion_smartcase = 1";
# }
# {
# plugin = nerdcommenter; # toggle: <leader>c<space>, comment: <leader>cc
# config = "let g:NERDSpaceDelims = 1";
# }
# {
# plugin = vim-airline;
# config = ''
# let g:airline#extensions#tabline#enabled = 1
# let g:airline#extensions#ale#enabled = 1
# let g:airline_powerline_fonts = 1
# '';
# }
# vim-airline-themes
# {
# plugin = nord-vim;
# config = ''
# colorscheme nord
# let g:nord_italic = 1
# let g:nord_underline = 1
# '';
# }
# ];
# extraConfig = ''
# set hidden
# set number
# set ignorecase
# set smartcase
# set magic
# set mouse=a
# let mapleader="\<Space>" programs.neovim = {
# let maplocalleader="\\" enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
coc = {
enable = true;
settings = ''
{
"tsserver.formatOnType": true,
"coc.preferences.formatOnType": true
}
'';
};
plugins = with pkgs.vimPlugins; [ # ale
vim-repeat vim-snippets vim-signify vim-orgmode vim-devicons vim-startify vim-highlightedyank
emmet-vim # <ctrl-y>,
vim-signature # marks in the gutter; mx (add), dmx (delete), m, (place next available), m. (next available if empty), m- (delete all on line), m<space> (delete all)
vim-expand-region # + / - to select increasingly larger / smaller regions∑
vim-better-whitespace # :StripWhitespace
vim-peekaboo # see registers when doing " @ and ctrl-r
vim-abolish # Substitution: :Subvert/child{,ren}/adult{,s}/g Coercios: crs (coerce to snake-case), crm (mixed), crc (camel), cru (upper), cr- (dash), cr., cr<space>, crt (title-case)
vim-polyglot # includes sensible, dups vim-sleuth
argtextobj-vim # daa => delete an argument
splitjoin-vim # gS / gJ to turn single-line code into multi, etc.
MatchTagAlways # highlights the matching & surrounding tags
vim-visual-multi # ctrl-n on word, n/N to select next/prev, [/] to switch cursors, q to skip, Q to remove current
# vim-endwise # automatically add end block keyword or symbol
vim-fugitive # Git, Gdiff, Gblame, Gstatus, Gcommit
vim-speeddating # ctrl-a & ctrl-x on dates
jdaddy-vim # cij: change inner json. gqaj: pretty print json
vim-surround # cs[{ -> change surrounding [ to {, cst -> change surrounding tag, ysiw] -> surround inner word with ], etc.
vim-tmux-navigator # ctrl-l -> right in vim splits then tmux panes, etc.
vim-sneak # stp -> jump to next occurance of 'tp'. ; -> next. , -> go back, `` -> back home
fzf-vim
vim-table-mode # <space>tm, || for rule, <space>tt -> tableize csv
tabular # :Tabularize /, :Tabu (shortcut & guess the right thing)
vim-markdown # zr, zR, zm, zM, za, zA, zc, zC for folding
vim-gnupg
vim-floaterm # <leader>T
undotree # <leader>u
vim-which-key
coc-nvim coc-css coc-html coc-eslint coc-tsserver coc-json coc-fzf coc-snippets
{
plugin = chadtree; # nvim-tree-lua
config = "let g:chadtree_settings = { 'xdg': v:true }";
}
{
plugin = vim-easy-align; # gaip= -> align inner paragraph on first =, gaip*= -> align aroud all =
config = ''
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
'';
}
{
plugin = vim-easymotion; # <leader><leader> w, <leader><leader>fx -> find x
config = "let g:EasyMotion_smartcase = 1";
}
{
plugin = nerdcommenter; # toggle: <leader>c<space>, comment: <leader>cc
config = "let g:NERDSpaceDelims = 1";
}
{
plugin = vim-airline;
config = ''
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:airline_powerline_fonts = 1
'';
}
vim-airline-themes
{
plugin = nord-vim;
config = ''
colorscheme nord
let g:nord_italic = 1
let g:nord_underline = 1
'';
}
];
extraConfig = ''
set hidden
set number
set ignorecase
set smartcase
set magic
set mouse=a
# let g:org_indent = 1 let mapleader="\<Space>"
let maplocalleader="\\"
# nnoremap <silent> <leader> :WhichKey '<Space>'<CR> let g:org_indent = 1
# nnoremap <silent> <leader>t :CHADopen<CR>
# nnoremap <silent> <leader>T :FloatermNew<CR>
# nnoremap <silent> <leader>u :UndotreeToggle<cr>
# " let g:coc_snippet_next = '<tab>' nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
# " let g:coc_snippet_prev = '<S-Tab>' nnoremap <silent> <leader>t :CHADopen<CR>
nnoremap <silent> <leader>T :FloatermNew<CR>
nnoremap <silent> <leader>u :UndotreeToggle<cr>
# " CoC " let g:coc_snippet_next = '<tab>'
# " Use tab for trigger completion with characters ahead and navigate. " let g:coc_snippet_prev = '<S-Tab>'
# inoremap <silent><expr> <TAB> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<TAB>" : coc#refresh()
# inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
# " Make <CR> auto-select the first completion item and notify coc.nvim to " CoC
# " format on enter, <cr> could be remapped by other vim plugin " Use tab for trigger completion with characters ahead and navigate.
# inoremap <silent><expr> <CR> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" inoremap <silent><expr> <TAB> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<TAB>" : coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
# function! s:check_back_space() abort " Make <CR> auto-select the first completion item and notify coc.nvim to
# let col = col('.') - 1 " format on enter, <cr> could be remapped by other vim plugin
# return !col || getline('.')[col - 1] =~# '\s' inoremap <silent><expr> <CR> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
# endfunction
# " GoTo code navigation. function! s:check_back_space() abort
# nmap <silent> gd <Plug>(coc-definition) let col = col('.') - 1
# nmap <silent> gy <Plug>(coc-type-definition) return !col || getline('.')[col - 1] =~# '\s'
# nmap <silent> gi <Plug>(coc-implementation) endfunction
# nmap <silent> gr <Plug>(coc-references)
# " Use K to show documentation in preview window. " GoTo code navigation.
# nnoremap <silent> K :call <SID>show_documentation()<CR> nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
# function! s:show_documentation() " Use K to show documentation in preview window.
# if (index(['vim','help'], &filetype) >= 0) nnoremap <silent> K :call <SID>show_documentation()<CR>
# execute 'h '.expand('<cword>')
# elseif (coc#rpc#ready())
# call CocActionAsync('doHover')
# else
# execute '!' . &keywordprg . " " . expand('<cword>')
# endif
# endfunction
# " Highlight the symbol and its references when holding the cursor. function! s:show_documentation()
# autocmd CursorHold * silent call CocActionAsync('highlight') if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
# nnoremap <silent><leader>/ :noh<cr> " Highlight the symbol and its references when holding the cursor.
# nnoremap <leader>v <c-w>v<c-w>l autocmd CursorHold * silent call CocActionAsync('highlight')
# nnoremap <leader>s <c-w>s<c-w>j
# nnoremap <silent> <leader>a :Rg<CR> nnoremap <silent><leader>/ :noh<cr>
# nnoremap <silent> <leader>f :Files<CR> nnoremap <leader>v <c-w>v<c-w>l
# nnoremap <silent> <leader>b :Buffers<CR> nnoremap <leader>s <c-w>s<c-w>j
# nnoremap <silent> <leader>w :Windows<CR>
# nnoremap <silent> <leader>C :Commands<CR> nnoremap <silent> <leader>a :Rg<CR>
# nnoremap <silent> <leader>hf :History<CR> nnoremap <silent> <leader>f :Files<CR>
# nnoremap <silent> <leader>hc :History:<CR> nnoremap <silent> <leader>b :Buffers<CR>
# nnoremap <silent> <leader>hs :History/<CR> nnoremap <silent> <leader>w :Windows<CR>
# nnoremap <silent> <leader>l :BLines<CR> nnoremap <silent> <leader>C :Commands<CR>
# nnoremap <silent> <leader><leader>l :Lines<CR> nnoremap <silent> <leader>hf :History<CR>
# " nnoremap <silent> <leader>t :BTags<CR> nnoremap <silent> <leader>hc :History:<CR>
# nnoremap <silent> <leader><leader>t :Tags<CR> nnoremap <silent> <leader>hs :History/<CR>
# nnoremap <silent> <leader>gc :BCommits<CR> nnoremap <silent> <leader>l :BLines<CR>
# nnoremap <silent> <leader><leader>gc :Commits<CR> nnoremap <silent> <leader><leader>l :Lines<CR>
# nmap <leader><tab> <plug>(fzf-maps-n) " nnoremap <silent> <leader>t :BTags<CR>
# xmap <leader><tab> <plug>(fzf-maps-x) nnoremap <silent> <leader><leader>t :Tags<CR>
# omap <leader><tab> <plug>(fzf-maps-o) nnoremap <silent> <leader>gc :BCommits<CR>
# imap <c-x><c-k> <plug>(fzf-complete-word) nnoremap <silent> <leader><leader>gc :Commits<CR>
# imap <c-x><c-f> <plug>(fzf-complete-path) nmap <leader><tab> <plug>(fzf-maps-n)
# imap <c-x><c-j> <plug>(fzf-complete-file-ag) xmap <leader><tab> <plug>(fzf-maps-x)
# imap <c-x><c-l> <plug>(fzf-complete-line) omap <leader><tab> <plug>(fzf-maps-o)
# ''; imap <c-x><c-k> <plug>(fzf-complete-word)
# }; imap <c-x><c-f> <plug>(fzf-complete-path)
imap <c-x><c-j> <plug>(fzf-complete-file-ag)
imap <c-x><c-l> <plug>(fzf-complete-line)
'';
};
programs.bat = { programs.bat = {
enable = true; enable = true;
@ -396,9 +407,4 @@ in
abort_merge: Some(( code: Char('M'), modifiers: ( bits: 1,),)), abort_merge: Some(( code: Char('M'), modifiers: ( bits: 1,),)),
)''; )'';
}; };
home.file.helix = {
target = ".config/helix/config.toml";
text = "theme = \"nord\"";
};
} }