Provide words in 'dictionary'
autocompletion source for prabirshrestha/asyncomplete.vim
With dein.vim
Write following text to your TOML configulation file of dein.vim and execute :call dein#install()
. in your Vim.
[[plugins]]
repo = 'koturn/asyncomplete-dictionary.vim'
hook_add = '''
autocmd User asyncomplete_setup call asyncomplete#register_source(
\ asyncomplete#sources#dictionary#get_source_options({
\ 'name': 'dictionary',
\ 'allowlist': ['*'],
\ 'completor': function('asyncomplete#sources#dictionary#completor')
\ }))
'''
Write following code to your .vimrc
and execute :call dein#install()
in your Vim.
call dein#add('koturn/asyncomplete-dictionary.vim', {
\ 'hook_add': join([
\ 'autocmd User asyncomplete_setup call asyncomplete#register_source(',
\ 'asyncomplete#sources#dictionary#get_source_options({',
\ "'name': 'dictionary',",
\ "'allowlist': ['*'],",
\ "'completor': function('asyncomplete#sources#dictionary#completor')"
\ }), ' ')
\ ], "")
\})
With vim-plug
Write following code to your .vimrc
and execute :PlugInstall
in your Vim.
Plug 'koturn/vim'
With vim-pathogen
Clone this repository to the package directory of pathogen.
$ git clone https://github.com/koturn/asyncomplete-dictionary.vim ~/.vim/bundle/vim
In the first, clone this repository to the package directory.
$ git clone https://github.com/koturn/asyncomplete-dictionary.vim ~/.vim/pack/koturn/opt/vim
Second, add following code to your .vimrc
.
packadd asyncomplete-dictionary.vim
If you don't want to use plugin manager, put files and directories on
~/.vim/
, or %HOME%/vimfiles/
on Windows.
autocmd User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#dictionary#get_source_options({
\ 'name': 'dictionary',
\ 'allowlist': ['*'],
\ 'completor': function('asyncomplete#sources#dictionary#completor'),
\ }))
Cache level.
let g:asyncomplete_dictionary_cache_level = 2
Cache Level | Description |
---|---|
0 |
Parse all dictionaries specifiled in global and local 'dictionary' every time. |
1 (Default) |
Parse all dictionaries specifiled in global and local 'dictionary' on the first time and cache the words. Don't remake cache as long as global or local value of 'dictionary' is not updated, or dictionary files is not changed, deleted or created. |
2 |
Parse all dictionaries specifiled in global and local 'dictionary' on the first time and cache the words. Don't remake cache. |
This software is released under the MIT License, see LICENSE.