Skip to content

Instantly share code, notes, and snippets.

@afnanenayet
Created April 19, 2018 17:41
Show Gist options
  • Save afnanenayet/8c2ee0fdabb8d1e292b788f9723673c5 to your computer and use it in GitHub Desktop.
Save afnanenayet/8c2ee0fdabb8d1e292b788f9723673c5 to your computer and use it in GitHub Desktop.
" deoplete.vim contains vim settings relevant to the deoplete autocompletion
" plugin
" for more details about my neovim setup see:
" http://afnan.io/2018-04-12/my-neovim-development-setup/
" deoplete options
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
" disable autocomplete by default
let b:deoplete_disable_auto_complete=1
let g:deoplete_disable_auto_complete=1
call deoplete#custom#buffer_option('auto_complete', v:false)
if !exists('g:deoplete#omni#input_patterns')
let g:deoplete#omni#input_patterns = {}
endif
" Disable the candidates in Comment/String syntaxes.
call deoplete#custom#source('_',
\ 'disabled_syntaxes', ['Comment', 'String'])
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
" set sources
let g:deoplete#sources = {}
let g:deoplete#sources.cpp = ['LanguageClient']
let g:deoplete#sources.python = ['LanguageClient']
let g:deoplete#sources.python3 = ['LanguageClient']
let g:deoplete#sources.rust = ['LanguageClient']
let g:deoplete#sources.c = ['LanguageClient']
let g:deoplete#sources.vim = ['vim']
" deoplete-racer config
let g:deoplete#sources#rust#racer_binary='/Users/aenayet/.cargo/bin/racer'
let g:deoplete#sources#rust#rust_source_path= '/Users/aenayet/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src'
@bosr
Copy link

bosr commented May 13, 2018

Thanks for this and the blog post!

@Normynator
Copy link

set sources was not working for me. I guess it was removed.

DOC:
2018.04.09

  • Remove "g:deoplete#sources" variable.

I used:
call deoplete#custom#source('LanguageClient')
instead.

@Jens0512
Copy link

Can you please add java to the example? 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment