Move fzf and coc to opt
This commit is contained in:
parent
6f5b95d305
commit
227cb5c77f
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -50,10 +50,10 @@
|
||||
path = pack/plugins/start/vim-signify
|
||||
url = https://github.com/mhinz/vim-signify.git
|
||||
[submodule ".vim/bundle/fzf"]
|
||||
path = pack/plugins/start/fzf
|
||||
path = pack/plugins/opt/fzf
|
||||
url = https://github.com/junegunn/fzf
|
||||
[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
|
||||
[submodule ".vim/bundle/tcomment_vim"]
|
||||
path = pack/plugins/start/tcomment_vim
|
||||
@ -71,7 +71,7 @@
|
||||
path = pack/plugins/start/vim-fugitive
|
||||
url = https://github.com/tpope/vim-fugitive.git
|
||||
[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
|
||||
[submodule "pack/plugins/start/vim-rooter"]
|
||||
path = pack/plugins/start/vim-rooter
|
||||
|
2
init.vim
2
init.vim
@ -1,4 +1,4 @@
|
||||
runtime options.vim
|
||||
runtime plugins.vim
|
||||
runtime keymaps.vim
|
||||
runtime plugins.vim
|
||||
runtime util.vim
|
||||
|
35
keymaps.vim
35
keymaps.vim
@ -41,38 +41,3 @@ nnoremap k gk
|
||||
|
||||
" util
|
||||
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)
|
||||
|
51
plugins.vim
51
plugins.vim
@ -1,13 +1,39 @@
|
||||
" coc.nvim
|
||||
if executable('node')
|
||||
packadd coc.nvim
|
||||
|
||||
highlight CocErrorSign ctermfg=Red guifg=#dc322f
|
||||
highlight CocWarningSign ctermfg=Yellow guifg=#b58900
|
||||
highlight CocInfoHighlight ctermfg=Blue guifg=#268bd2
|
||||
|
||||
" fzf
|
||||
let $FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -f -g "" 2> /dev/null'
|
||||
if has('windows')
|
||||
let g:fzf_preview_window = ''
|
||||
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
|
||||
if executable('fzf')
|
||||
packadd fzf.vim
|
||||
packadd fzf
|
||||
|
||||
let $FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -f -g "" 2> /dev/null'
|
||||
let g:fzf_colors = {
|
||||
\ 'bg': ['bg', 'Normal'],
|
||||
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
||||
@ -24,15 +50,32 @@ let g:fzf_colors = {
|
||||
\ '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
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline_symbols_ascii = 1
|
||||
|
||||
" vim-argwrap
|
||||
nnoremap <silent><leader>a :ArgWrap<cr>
|
||||
|
||||
" vim-dirvish
|
||||
let g:dirvish_mode = ':sort ,^.*[\/],'
|
||||
|
||||
" vim-easy-align
|
||||
let g:easy_align_ignore_groups = []
|
||||
nmap ga <plug>(EasyAlign)
|
||||
vmap <cr> <plug>(EasyAlign)
|
||||
|
||||
" vim-go
|
||||
let g:go_fmt_command = 'goimports'
|
||||
|
Loading…
Reference in New Issue
Block a user