diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 45ab71bd..96f64e21 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -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 = {} diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index c3f07aed..a64c2ba5 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -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 ):