Allow '*' in ycm_filetype_specific_completion_to_disable.

I love YCM's auto popup with keyword completion when power typing but
would rather not have semantic completion activate unless I really want
it to (most semantic completers are somewhat slow and sometimes end up
breaking my flow). When in API exploration mode, I don't mind having
to press C-Space to force completion and wait a bit more.

Unless I'm mistaken, the current code does not allow wildcards in the
specification of filetypes on which to disable automatic semantic
completion. This change allows the use of '*' to disable automatic
semantic completion in all files.
This commit is contained in:
Alexandre Fonseca 2014-03-06 17:43:44 +01:00
parent 9cff4e8548
commit 09379b3ff6

View File

@ -332,6 +332,9 @@ class YouCompleteMe( object ):
filetypes = vimsupport.CurrentFiletypes()
filetype_to_disable = self._user_options[
'filetype_specific_completion_to_disable' ]
if '*' in filetype_to_disable:
return False
else:
return not all([ x in filetype_to_disable for x in filetypes ])