Merge pull request #869 from AlexJF/wild_autosem_disable

Allow '*' in ycm_filetype_specific_completion_to_disable.
This commit is contained in:
Val Markovic 2014-07-16 09:56:52 -07:00
commit dfdadbdbcb
2 changed files with 7 additions and 1 deletions

View File

@ -1030,6 +1030,9 @@ support that filetype.
You can get the filetype of the current file in Vim with ':set ft?'.
To disable the semantic completion engine for all filetypes, you can use '*'
as a special wildcard filetype key: {'*': 1}.
Default: '{}'
>
let g:ycm_filetype_specific_completion_to_disable = {}

View File

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