diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 95d9be5e..716cb9e3 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -97,20 +97,28 @@ ''; programs.vim.enable = true; - programs.vim.enableSensible = true; + # programs.vim.enableSensible = true; - programs.vim.plugins = [ - { names = [ "commentary" "vim-eunuch" "repeat" "tabular" "ReplaceWithRegister" "vim-indent-object" "vim-sort-motion" ]; } - { names = [ "fzfWrapper" "fzf-vim" "youcompleteme" "ale" "vim-gitgutter" "vim-dispatch" ]; } - { names = [ "fugitive" "rhubarb" "gist-vim" "webapi-vim" ]; } - { names = [ "polyglot" "bats-vim" "colors-solarized" "editorconfig-vim" ]; } - ]; + programs.vim.plugins = [{ + names = [ + "sensible" "repeat" "surround" + "ReplaceWithRegister" "vim-indent-object" "vim-sort-motion" + "fzfWrapper" "fzf-vim" "youcompleteme" "ale" "vim-dispatch" "vim-test" "vim-projectionist" "vim-gitgutter" + "vim-abolish" "commentary" "vim-eunuch" "fugitive" "rhubarb" "tabular" "vim-tbone" "editorconfig-vim" + "gist-vim" "webapi-vim" + + "colors-solarized" "polyglot" "vim-nix" "bats-vim" "vim-docbk" + + "vim-scriptease" + # "vim-splice" + ]; + }]; programs.vim.vimConfig = '' - colorscheme solarized - set bg=dark - - set synmaxcol=4096 + set encoding=utf-8 + set hlsearch + set list + set number set lazyredraw set regexpengine=1 @@ -137,6 +145,17 @@ call mkdir(expand(&directory), "p") endif + command! -bang -nargs=* Ag call fzf#vim#ag(, + \ 0 ? fzf#vim#with_preview('up:30%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + + command! -bang -nargs=* Rg call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:30%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + vmap s S inoremap @@ -149,42 +168,32 @@ nnoremap ( :tabprevious nnoremap ) :tabnext - nnoremap ! :Dispatch! + " fzf nnoremap p :FZF nnoremap e :exe 'FZF ' . expand('%:h') - nmap (fzf-maps-n) - xmap (fzf-maps-x) - omap (fzf-maps-o) - imap (fzf-complete-word) + " vim-dispatch + nnoremap :Dispatch! + nnoremap q :cclose :lclose :pclose - command! -bang -nargs=* Ag call fzf#vim#ag(, - \ 0 ? fzf#vim#with_preview('up:30%') - \ : fzf#vim#with_preview('right:50%:hidden', '?'), - \ 0) - - command! -bang -nargs=* Rg call fzf#vim#grep( - \ 'rg --column --line-number --no-heading --color=always '.shellescape(), 1, - \ 0 ? fzf#vim#with_preview('up:30%') - \ : fzf#vim#with_preview('right:50%:hidden', '?'), - \ 0) - - highlight clear SignColumn + " vim-test + let test#strategy = 'dispatch' + nnoremap t :TestNearest + " ale let g:is_bash=1 - let g:ale_virtualenv_dir_names = ['venv'] - " let g:ycm_add_preview_to_completeopt = 1 - let g:ycm_autoclose_preview_window_after_completion = 1 - let g:ycm_autoclose_preview_window_after_insertion = 1 - + " youcompleteme + set completeopt=menuone let g:ycm_seed_identifiers_with_syntax = 1 let g:ycm_semantic_triggers = {} - nmap D :YcmCompleter GetDoc - nmap d :YcmCompleter GoToDefinition - nmap r :YcmCompleter GoToReferences + nmap d :YcmCompleter GoTo + + " colors-solarized + let g:solarized_termcolors = 16 + let g:solarized_termtrans = 1 ''; programs.zsh.enable = true;