Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

Setting sources for multiple filetype buffers #1167

Closed roylez closed 3 years ago

roylez commented 3 years ago

Problems summary

I use multiple filetype markdown.vim-edit for some ad-hot editing, I can set deoplete sources for markdown, or for vim-edit, but sources for markdown.vim-edit defaults to what is set for _.

Expected

muti filetype buffers should have sources inherited from every types

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

call deoplete#custom#option({
            \'sources': {
            \'_': ['buffer'],
            \'markdown': ['buffer', 'dictionary'],
            \'vim-edit': ['buffer', 'dictionary']})

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Start with the above configuration. Open a markdown file, buffer and dictionary completion should be both there. set ft=markdown.vim-edit, and dictionary completion will be gone.

  2. add 'markdown.vim-edit': ['buffer', 'dictionary'] to configuration, and reopen the file, dictionary completion will be available.

Shougo commented 3 years ago

Fixed.

roylez commented 3 years ago

Thanks a lot. It works great.