diff --git a/files/vim/.vimrc b/files/vim/.vimrc index b56352f..8c8b997 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -17,25 +17,13 @@ call plug#begin() " essentials Plug 'jiangmiao/auto-pairs' " pair completion -Plug 'tpope/vim-fugitive' " git(1) command wrapper Plug 'mhinz/vim-signify' " show lines changed in git(1) Plug 'tpope/vim-commentary' " DWIM comments Plug 'sheerun/vim-polyglot' " language packs (highlighting, indent) -" nice to have -Plug 'metakirby5/codi.vim' " interactive python (:Codi and :Codi!) - Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' -if executable('cargo') - " XXX requires locally installed lsp's (see LSP section) - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } -endif - " colors Plug 'sainnhe/everforest' " color scheme Plug 'vim-airline/vim-airline' " nicer status line @@ -83,23 +71,6 @@ let g:fzf_preview_window = ['down,50%', 'ctrl-/'] let g:LanguageClient_useFloatingHover = 1 " prevent buggy split preview from opening " ============================== Statusline -let g:airline_powerline_fonts = 1 -let g:airline_mode_map = { - \ 'i' : '', - \ 'ic' : '', - \ 'ix' : '', - \ 'n' : '', - \ 'multi' : '並', - \ 'ni' : '', - \ 'no' : '', - \ 'R' : 'ﰇ', - \ 'Rv' : 'ﰇ', - \ 'v' : '', - \ 'V' : '  ', - \ '' : ' ', - \ 'c' : '' - \ } - let g:airline_section_x = airline#section#create([]) let g:airline_section_y = airline#section#create_right(['%{&fileencoding}', '%{&fileformat}', '%{&filetype}']) let g:airline_section_z = airline#section#create(['%{line(".")}:%{col(".")}']) @@ -125,30 +96,20 @@ let &t_SI = "\[6 q" let &t_SR = "\[4 q" let &t_EI = "\[2 q" -" ============================== netrw -let g:netrw_winsize = 25 " width -let g:netrw_liststyle = 3 " Tree-like structure - " ============================== Macros and Mappings -" im a lazy brick -cabbrev g Git -cabbrev mktex latexmk -xelatex -shell-escape -cabbrev vs vsplit +map f :GFiles +map F :Files -" search files via fzf -map :Files - -" search in git tracked files with git-grep(1) command! -bang -nargs=* GGrep \ call fzf#vim#grep( \ 'git grep --line-number -- '.shellescape(), 0, \ fzf#vim#with_preview(), 0) if has("linux") - map :GGrep + map :GGrep else " for some reason, openbsd doesnt like fzf live commands - map :GGrep + map :GGrep endif " kill whitespaces fast and efficient @@ -160,26 +121,7 @@ endfun noremap ws :call TrimWhitespace() " comment DWIM -map :Commentary +map :Commentary " clear search highlighting faster map :noh - -" ============================== LSP -set hidden -let g:LanguageClient_serverCommands = { - \ 'rust': ['rust-analyzer'], - \ 'python': ['pylsp'], - \ 'c': ['clangd'], - \ 'cpp': ['clangd'], - \ 'yaml': ['yaml-lsp'], - \ } - -nnoremap :call LanguageClient_contextMenu() -map :call LanguageClient#textDocument_rename() -map :call LanguageClient#textDocument_definition() -map :call LanguageClient#textDocument_hover() - -" completion suggestions mapped to -inoremap -imap