1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
if has('nvim')
finish
endif
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
let g:asyncomplete_auto_popup = 1
packadd asyncomplete.vim
packadd asyncomplete-lsp.vim
packadd asyncomplete-ultisnips.vim
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ultisnips#get_source_options({
\ 'name': 'ultisnips',
\ 'allowlist': ['*'],
\ 'completor': function('asyncomplete#sources#ultisnips#completor'),
\ }))
packadd asyncomplete-tags.vim
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#tags#get_source_options({
\ 'name': 'tags',
\ 'allowlist': ['*'],
\ 'completor': function('asyncomplete#sources#tags#completor'),
\ 'config': {
\ 'max_file_size': 50000000,
\ },
\ }))
packadd asyncomplete-file.vim
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({
\ 'name': 'file',
\ 'allowlist': ['*'],
\ 'priority': 10,
\ 'completor': function('asyncomplete#sources#file#completor')
\ }))
packadd asyncomplete-buffer.vim
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'buffer',
\ 'allowlist': ['*'],
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ 'config': {
\ 'max_buffer_size': 5000000,
\ },
\ }))
packadd asyncomplete-omni.vim
autocmd User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'allowlist': ['*'],
\ 'blocklist': [],
\ 'completor': function('asyncomplete#sources#omni#completor'),
\ 'config': {
\ 'show_source_kind': 1,
\ },
\ }))
|