diff --git a/bin/sync b/bin/sync index 78ade86..56815e3 100755 --- a/bin/sync +++ b/bin/sync @@ -4,6 +4,10 @@ if command -v mbsync &> /dev/null; then mbsync -a fi +if command -v mu &> /dev/null; then + mu index +fi + if command -v vdirsyncer &> /dev/null; then vdirsyncer sync fi diff --git a/home-cli.nix b/home-cli.nix index 0e08b66..91a76d6 100644 --- a/home-cli.nix +++ b/home-cli.nix @@ -5,7 +5,7 @@ let in { home.packages = with pkgs; [ - 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 + 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 nodejs deno yarn nodePackages.stylelint nodePackages.js-beautify ocaml dune_2 ocamlPackages.utop ocamlPackages.ocp-indent ocamlPackages.merlin # racket-minimal @@ -17,7 +17,7 @@ in ]; home.sessionVariables = { - EDITOR = "vim"; + EDITOR = "hx"; MANPAGER = "sh -c 'col -bx | bat -l man -p'"; PATH = "$PATH:${builtins.getEnv "HOME"}/.emacs.d/bin:${builtins.getEnv "HOME"}/.cargo/bin"; EXA_ICON_SPACING = 2; @@ -151,172 +151,172 @@ in package = ((pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ epkgs.vterm ])); }; - programs.neovim = { - 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 # , - 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 (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, 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 # tm, || for rule, 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 # T - undotree # 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 (EasyAlign) - nmap ga (EasyAlign) - ''; - } - { - plugin = vim-easymotion; # w, fx -> find x - config = "let g:EasyMotion_smartcase = 1"; - } - { - plugin = nerdcommenter; # toggle: c, comment: 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="\" - let maplocalleader="\\" - - let g:org_indent = 1 - - nnoremap :WhichKey '' - nnoremap t :CHADopen - nnoremap T :FloatermNew - nnoremap u :UndotreeToggle - - " let g:coc_snippet_next = '' - " let g:coc_snippet_prev = '' - - " CoC - " Use tab for trigger completion with characters ahead and navigate. - inoremap pumvisible() ? "\" : check_back_space() ? "\" : coc#refresh() - inoremap pumvisible() ? "\" : "\" - - " Make auto-select the first completion item and notify coc.nvim to - " format on enter, could be remapped by other vim plugin - inoremap pumvisible() ? coc#_select_confirm() : "\u\\=coc#on_enter()\" - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - " GoTo code navigation. - nmap gd (coc-definition) - nmap gy (coc-type-definition) - nmap gi (coc-implementation) - nmap gr (coc-references) - - " Use K to show documentation in preview window. - nnoremap K :call show_documentation() - - function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - elseif (coc#rpc#ready()) - call CocActionAsync('doHover') - else - execute '!' . &keywordprg . " " . expand('') - endif - endfunction - - " Highlight the symbol and its references when holding the cursor. - autocmd CursorHold * silent call CocActionAsync('highlight') - - nnoremap / :noh - nnoremap v vl - nnoremap s sj - - nnoremap a :Rg - nnoremap f :Files - nnoremap b :Buffers - nnoremap w :Windows - nnoremap C :Commands - nnoremap hf :History - nnoremap hc :History: - nnoremap hs :History/ - nnoremap l :BLines - nnoremap l :Lines - " nnoremap t :BTags - nnoremap t :Tags - nnoremap gc :BCommits - nnoremap gc :Commits - nmap (fzf-maps-n) - xmap (fzf-maps-x) - omap (fzf-maps-o) - imap (fzf-complete-word) - imap (fzf-complete-path) - imap (fzf-complete-file-ag) - imap (fzf-complete-line) - ''; - }; +# programs.neovim = { +# 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 # , +# 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 (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, 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 # tm, || for rule, 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 # T +# undotree # 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 (EasyAlign) +# nmap ga (EasyAlign) +# ''; +# } +# { +# plugin = vim-easymotion; # w, fx -> find x +# config = "let g:EasyMotion_smartcase = 1"; +# } +# { +# plugin = nerdcommenter; # toggle: c, comment: 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="\" +# let maplocalleader="\\" + +# let g:org_indent = 1 + +# nnoremap :WhichKey '' +# nnoremap t :CHADopen +# nnoremap T :FloatermNew +# nnoremap u :UndotreeToggle + +# " let g:coc_snippet_next = '' +# " let g:coc_snippet_prev = '' + +# " CoC +# " Use tab for trigger completion with characters ahead and navigate. +# inoremap pumvisible() ? "\" : check_back_space() ? "\" : coc#refresh() +# inoremap pumvisible() ? "\" : "\" + +# " Make auto-select the first completion item and notify coc.nvim to +# " format on enter, could be remapped by other vim plugin +# inoremap pumvisible() ? coc#_select_confirm() : "\u\\=coc#on_enter()\" + +# function! s:check_back_space() abort +# let col = col('.') - 1 +# return !col || getline('.')[col - 1] =~# '\s' +# endfunction + +# " GoTo code navigation. +# nmap gd (coc-definition) +# nmap gy (coc-type-definition) +# nmap gi (coc-implementation) +# nmap gr (coc-references) + +# " Use K to show documentation in preview window. +# nnoremap K :call show_documentation() + +# function! s:show_documentation() +# if (index(['vim','help'], &filetype) >= 0) +# execute 'h '.expand('') +# elseif (coc#rpc#ready()) +# call CocActionAsync('doHover') +# else +# execute '!' . &keywordprg . " " . expand('') +# endif +# endfunction + +# " Highlight the symbol and its references when holding the cursor. +# autocmd CursorHold * silent call CocActionAsync('highlight') + +# nnoremap / :noh +# nnoremap v vl +# nnoremap s sj + +# nnoremap a :Rg +# nnoremap f :Files +# nnoremap b :Buffers +# nnoremap w :Windows +# nnoremap C :Commands +# nnoremap hf :History +# nnoremap hc :History: +# nnoremap hs :History/ +# nnoremap l :BLines +# nnoremap l :Lines +# " nnoremap t :BTags +# nnoremap t :Tags +# nnoremap gc :BCommits +# nnoremap gc :Commits +# nmap (fzf-maps-n) +# xmap (fzf-maps-x) +# omap (fzf-maps-o) +# imap (fzf-complete-word) +# imap (fzf-complete-path) +# imap (fzf-complete-file-ag) +# imap (fzf-complete-line) +# ''; +# }; programs.bat = { enable = true;