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?'. 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: '{}' Default: '{}'
> >
let g:ycm_filetype_specific_completion_to_disable = {} let g:ycm_filetype_specific_completion_to_disable = {}

View File

@ -332,6 +332,9 @@ class YouCompleteMe( object ):
filetypes = vimsupport.CurrentFiletypes() filetypes = vimsupport.CurrentFiletypes()
filetype_to_disable = self._user_options[ filetype_to_disable = self._user_options[
'filetype_specific_completion_to_disable' ] '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 ]) return not all([ x in filetype_to_disable for x in filetypes ])