~cyplo/dotfiles

ref: 0f34b9d1bf61e8be3e61351814603e01c8bf42cd dotfiles/.vimrc.plugins-settings -rw-r--r-- 1.6 KiB
0f34b9d1 — Cyryl Płotnicki upgrade rust-analyzer 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
" plugins: airline
let g:bufferline_echo = 0
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1

au BufWrite * :Autoformat

" plugins: rust
let g:rustfmt_autosave = 1

" searching
let $FZF_DEFAULT_COMMAND = 'rg --files --no-messages "" .'
set grepprg=rg\ --vimgrep
let g:fzf_command_prefix = 'Fzf'
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
let g:ctrlp_show_hidden = 1
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'

" nerdtree startup
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" rainbow
let g:rainbow_active = 1

" coc
set shortmess+=c
set signcolumn=yes

autocmd CursorHold * silent call CocActionAsync('highlight')

augroup mygroup
    autocmd!
    " Setup formatexpr specified filetype(s).
    autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
    " Update signature help on jump placeholder.
    autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end

command! -nargs=0 Format :call CocAction('format')
command! -nargs=? Fold :call     CocAction('fold', <f-args>)
command! -nargs=0 OR   :call     CocAction('runCommand', 'editor.action.organizeImport')

set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}

" ack
let g:ackprg = 'rg --vimgrep --smart-case'
let g:ack_autoclose = 1
let g:ack_use_cword_for_empty_search = 1