vimrc: autocomplete improvements

This commit is contained in:
Rob Watson 2021-01-24 21:35:01 +01:00
parent 3adfef1ae4
commit cc00f6aa9f
1 changed files with 6 additions and 2 deletions

8
vimrc
View File

@ -128,6 +128,10 @@ map <Leader>8 :call RequestGrep()<CR>
packadd! deoplete.nvim packadd! deoplete.nvim
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
call deoplete#custom#option('num_processes', 6) call deoplete#custom#option('num_processes', 6)
" https://github.com/Shougo/deoplete.nvim/issues/965#issuecomment-482925193
call deoplete#custom#option('omni_patterns', {
\ 'go': '[^. *\t]\.\w*',
\})
" <TAB>: completion. " <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr><s-TAB> pumvisible() ? "\<C-p>" : "\<s-TAB>" inoremap <expr><s-TAB> pumvisible() ? "\<C-p>" : "\<s-TAB>"
@ -169,7 +173,6 @@ let g:rustfmt_autosave = 1
" ALE configuration: " ALE configuration:
" Note: needs https://github.com/dense-analysis/ale/issues/3373 " Note: needs https://github.com/dense-analysis/ale/issues/3373
" to avoid "json decode error" during deoplete resolution. " to avoid "json decode error" during deoplete resolution.
set omnifunc=ale#completion#OmniFunc
function SymbolSearch() function SymbolSearch()
call inputsave() call inputsave()
let s:pattern = trim(input("symbol search: ")) let s:pattern = trim(input("symbol search: "))
@ -216,7 +219,7 @@ let g:ale_rust_analyzer_config = {
let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular' let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular'
let g:ale_go_gopls_options = '' " TODO: composite keys? let g:ale_go_gopls_options = '' " TODO: composite keys?
let g:ale_command_wrapper = 'nice -n5' let g:ale_command_wrapper = 'nice -n5'
let g:ale_completion_enabled = 1 let g:ale_completion_enabled = 0
let g:ale_close_preview_on_insert = 1 let g:ale_close_preview_on_insert = 1
let g:ale_hover_to_preview = 1 let g:ale_hover_to_preview = 1
let g:ale_sign_column_always = 1 let g:ale_sign_column_always = 1
@ -245,6 +248,7 @@ packadd! ale
" load other plugins: " load other plugins:
packadd! lightline.vim packadd! lightline.vim
packadd! tmux-complete.vim
packadd! vim-commentary packadd! vim-commentary
packadd! vim-surround packadd! vim-surround
packadd! vim-yaml-folds packadd! vim-yaml-folds