Port of the neco-look plugin for NCM2
Using look
to complete words in english
- ncm2
- nvim-yarp (required by ncm2)
look
binary. runwhich look
on your terminal to see if it's available;
Use your favorite plugin manager. I recommend vim-plug:
" NCM and it's requirements
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
" Look.vim completion plugin
Plug 'filipekiss/ncm2-look.vim'
" enable ncm2 for all buffer
autocmd BufEnter * call ncm2#enable_for_buffer()
" note that must keep noinsert in completeopt, the others is optional
set completeopt=noinsert,menuone,noselect
By default, look.vim will be disabled. After all, if you're writing code you don't want the completion popup jumping at you everytime you type something that remotely looks like a word.
Put this in your .vimrc
let g:ncm2_look_enabled = 1
:let b:ncm2_look_enabled = 1
Let's say you want to enable it for markdown files.
- Create a file in
~/.vim/ftplugin/markdown.vim
- Put
let b:ncm2_look_enabled = 1
on the file - Save and open a markdown file