Move fzf and coc to opt

This commit is contained in:
Alex Yatskov 2021-06-03 11:05:15 -07:00
parent 6f5b95d305
commit 227cb5c77f
7 changed files with 68 additions and 60 deletions

6
.gitmodules vendored
View File

@ -50,10 +50,10 @@
path = pack/plugins/start/vim-signify path = pack/plugins/start/vim-signify
url = https://github.com/mhinz/vim-signify.git url = https://github.com/mhinz/vim-signify.git
[submodule ".vim/bundle/fzf"] [submodule ".vim/bundle/fzf"]
path = pack/plugins/start/fzf path = pack/plugins/opt/fzf
url = https://github.com/junegunn/fzf url = https://github.com/junegunn/fzf
[submodule ".vim/bundle/fzf.vim"] [submodule ".vim/bundle/fzf.vim"]
path = pack/plugins/start/fzf.vim path = pack/plugins/opt/fzf.vim
url = https://github.com/junegunn/fzf.vim.git url = https://github.com/junegunn/fzf.vim.git
[submodule ".vim/bundle/tcomment_vim"] [submodule ".vim/bundle/tcomment_vim"]
path = pack/plugins/start/tcomment_vim path = pack/plugins/start/tcomment_vim
@ -71,7 +71,7 @@
path = pack/plugins/start/vim-fugitive path = pack/plugins/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git url = https://github.com/tpope/vim-fugitive.git
[submodule "pack/plugins/start/coc.nvim"] [submodule "pack/plugins/start/coc.nvim"]
path = pack/plugins/start/coc.nvim path = pack/plugins/opt/coc.nvim
url = https://github.com/neoclide/coc.nvim url = https://github.com/neoclide/coc.nvim
[submodule "pack/plugins/start/vim-rooter"] [submodule "pack/plugins/start/vim-rooter"]
path = pack/plugins/start/vim-rooter path = pack/plugins/start/vim-rooter

View File

@ -1,4 +1,4 @@
runtime options.vim runtime options.vim
runtime plugins.vim
runtime keymaps.vim runtime keymaps.vim
runtime plugins.vim
runtime util.vim runtime util.vim

View File

@ -41,38 +41,3 @@ nnoremap k gk
" util " util
nnoremap <leader>ig :Guid<cr> nnoremap <leader>ig :Guid<cr>
" coc.vim
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
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)
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
inoremap <expr><tab> pumvisible() ? '<C-y>' : '<tab>'
inoremap <expr><cr> pumvisible() ? '<C-e><cr>' : '<cr>'
" fzf
nnoremap <silent><leader>fg :GFiles<cr>
nnoremap <silent><leader>ff :Files ~<cr>
nnoremap <silent><leader>fh :History<cr>
nnoremap <silent><leader>fc :BCommits<cr>
nnoremap <silent><leader>fb :Buffers<cr>
nnoremap <silent><leader>fl :Lines<cr>
" vim-argwrap
nnoremap <silent><leader>a :ArgWrap<cr>
" vim-easy-align
nmap ga <plug>(EasyAlign)
vmap <cr> <plug>(EasyAlign)

View File

@ -1,14 +1,40 @@
" coc.nvim " coc.nvim
highlight CocErrorSign ctermfg=Red guifg=#dc322f if executable('node')
highlight CocWarningSign ctermfg=Yellow guifg=#b58900 packadd coc.nvim
highlight CocInfoHighlight ctermfg=Blue guifg=#268bd2
highlight CocErrorSign ctermfg=Red guifg=#dc322f
highlight CocWarningSign ctermfg=Yellow guifg=#b58900
highlight CocInfoHighlight ctermfg=Blue guifg=#268bd2
let g:coc_disable_startup_warning = 1
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
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)
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
inoremap <expr><tab> pumvisible() ? '<C-y>' : '<tab>'
inoremap <expr><cr> pumvisible() ? '<C-e><cr>' : '<cr>'
endif
" fzf " fzf
let $FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -f -g "" 2> /dev/null' if executable('fzf')
if has('windows') packadd fzf.vim
let g:fzf_preview_window = '' packadd fzf
endif
let g:fzf_colors = { let $FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -f -g "" 2> /dev/null'
let g:fzf_colors = {
\ 'bg': ['bg', 'Normal'], \ 'bg': ['bg', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'border': ['fg', 'Ignore'], \ 'border': ['fg', 'Ignore'],
@ -24,15 +50,32 @@ let g:fzf_colors = {
\ 'spinner': ['fg', 'Label'], \ 'spinner': ['fg', 'Label'],
\ } \ }
if has('windows')
let g:fzf_preview_window = ''
endif
nnoremap <silent><leader>fg :GFiles<cr>
nnoremap <silent><leader>ff :Files ~<cr>
nnoremap <silent><leader>fh :History<cr>
nnoremap <silent><leader>fc :BCommits<cr>
nnoremap <silent><leader>fb :Buffers<cr>
nnoremap <silent><leader>fl :Lines<cr>
endif
" vim-airline " vim-airline
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
let g:airline_symbols_ascii = 1 let g:airline_symbols_ascii = 1
" vim-argwrap
nnoremap <silent><leader>a :ArgWrap<cr>
" vim-dirvish " vim-dirvish
let g:dirvish_mode = ':sort ,^.*[\/],' let g:dirvish_mode = ':sort ,^.*[\/],'
" vim-easy-align " vim-easy-align
let g:easy_align_ignore_groups = [] let g:easy_align_ignore_groups = []
nmap ga <plug>(EasyAlign)
vmap <cr> <plug>(EasyAlign)
" vim-go " vim-go
let g:go_fmt_command = 'goimports' let g:go_fmt_command = 'goimports'