Deoplete.nvim: [Suggestion] Disable deoplete for certain file types

Created on 11 Apr 2017  路  2Comments  路  Source: Shougo/deoplete.nvim

Problems summary

I would like to see a way of disabling deoplete completely for certain filetypes.

Expected

Given an option such as: let g:deoplete#disable_for_file_type = {.tex, .bib, ...}

My config

" $HOME/.config/nvim/config/plugins.vimrc
" Invoke deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#disable_auto_complete = 0 " set to 1 if you want to disable autocomplete
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif

Most helpful comment

For reference, from the FAQ in the docs:

The b:deoplete_disable_auto_complete var was removed and the new way of doing this is

Q: I want to disable the auto completion for certain filetypes.

A: Please use |deoplete-options-auto_complete|. >

       autocmd FileType tex
       \ call deoplete#custom#buffer_option('auto_complete', v:false)

All 2 comments

autocmd FileType tex  let b:deoplete_disable_auto_complete = 1

For reference, from the FAQ in the docs:

The b:deoplete_disable_auto_complete var was removed and the new way of doing this is

Q: I want to disable the auto completion for certain filetypes.

A: Please use |deoplete-options-auto_complete|. >

       autocmd FileType tex
       \ call deoplete#custom#buffer_option('auto_complete', v:false)
Was this page helpful?
0 / 5 - 0 ratings