Add g:ycm_filter_diagnostics to list of options

This commit is contained in:
micbou 2018-11-26 12:49:36 +01:00
parent e651d970ed
commit f6ec5557c0
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05
3 changed files with 6 additions and 2 deletions

View File

@ -153,6 +153,9 @@ let g:ycm_echo_current_diagnostic =
\ get( g:, 'ycm_echo_current_diagnostic',
\ get( g:, 'syntastic_echo_current_error', 1 ) )
let g:ycm_filter_diagnostics =
\ get( g:, 'ycm_filter_diagnostics', {} )
let g:ycm_always_populate_location_list =
\ get( g:, 'ycm_always_populate_location_list',
\ get( g:, 'syntastic_always_populate_loc_list', 0 ) )

View File

@ -53,9 +53,9 @@ class DiagnosticFilter( object ):
@staticmethod
def CreateFromOptions( user_options ):
all_filters = dict( user_options.get( 'filter_diagnostics', {} ) )
all_filters = user_options[ 'filter_diagnostics' ]
compiled_by_type = {}
for type_spec, filter_value in iteritems( dict( all_filters ) ):
for type_spec, filter_value in iteritems( all_filters ):
filetypes = [ type_spec ]
if type_spec.find( ',' ) != -1:
filetypes = type_spec.split( ',' )

View File

@ -48,6 +48,7 @@ DEFAULT_CLIENT_OPTIONS = {
'g:ycm_enable_diagnostic_signs': 1,
'g:ycm_enable_diagnostic_highlighting': 0,
'g:ycm_echo_current_diagnostic': 1,
'g:ycm_filter_diagnostics': {},
'g:ycm_always_populate_location_list': 0,
'g:ycm_collect_identifiers_from_tags_files': 0,
'g:ycm_seed_identifiers_with_syntax': 0,