7

GitHub - prabirshrestha/asyncomplete-buffer.vim: provides buffer autocomplete fo...

 2 years ago
source link: https://github.com/prabirshrestha/asyncomplete-buffer.vim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Buffer source for asyncomplete.vim

Provide buffer autocompletion source for asyncomplete.vim

Installing

Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-buffer.vim'

Registration

call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
    \ 'name': 'buffer',
    \ 'allowlist': ['*'],
    \ 'blocklist': ['go'],
    \ 'completor': function('asyncomplete#sources#buffer#completor'),
    \ 'config': {
    \    'max_buffer_size': 5000000,
    \  },
    \ }))

Note: config is optional. max_buffer_size defaults to 5000000 (5mb). If the buffer size exceeds max_buffer_size it is ignored. Set max_buffer_size to -1 for unlimited buffer size.

Options

Clear buffer word cache on events (default: 1)

let g:asyncomplete_buffer_clear_cache = 1

Credits

All the credit goes to the following projects


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK