|
@@ -98,16 +98,19 @@ function! FernInit() abort
|
|
endfunction
|
|
endfunction
|
|
|
|
|
|
" use TAB to autocomplete w/ coc
|
|
" use TAB to autocomplete w/ coc
|
|
-inoremap <silent><expr> <TAB>
|
|
|
|
- \ pumvisible() ? "\<C-n>" :
|
|
|
|
- \ <SID>check_back_space() ? "\<TAB>" :
|
|
|
|
- \ coc#refresh()
|
|
|
|
-inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
|
|
-
|
|
|
|
-function! s:check_back_space() abort
|
|
|
|
- let col = col('.') - 1
|
|
|
|
- return !col || getline('.')[col - 1] =~# '\s'
|
|
|
|
-endfunction
|
|
|
|
|
|
+" inoremap <silent><expr> <TAB>
|
|
|
|
+" \ pumvisible() ? "\<C-n>" :
|
|
|
|
+" \ <SID>check_back_space() ? "\<TAB>" :
|
|
|
|
+" \ coc#refresh()
|
|
|
|
+" inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
|
|
+
|
|
|
|
+" function! s:check_back_space() abort
|
|
|
|
+" let col = col('.') - 1
|
|
|
|
+" return !col || getline('.')[col - 1] =~# '\s'
|
|
|
|
+" endfunction
|
|
|
|
+
|
|
|
|
+inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
|
|
|
+inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
|
|
|
|
|
" Use `:Format` to format current buffer
|
|
" Use `:Format` to format current buffer
|
|
command! -nargs=0 Format :call CocAction('format')
|
|
command! -nargs=0 Format :call CocAction('format')
|