2017-03-30 11:37:28 -04:00
|
|
|
" Author: w0rp <devw0rp@gmail.com>
|
|
|
|
" Description: Follow-up checks for the plugin: warn about conflicting plugins.
|
|
|
|
|
|
|
|
" A flag for ensuring that this is not run more than one time.
|
2017-03-06 18:15:28 -05:00
|
|
|
if exists('g:loaded_ale_after')
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2017-03-30 11:37:28 -04:00
|
|
|
" Set the flag so this file is not run more than one time.
|
2017-03-06 18:15:28 -05:00
|
|
|
let g:loaded_ale_after = 1
|
|
|
|
|
2017-03-30 11:37:28 -04:00
|
|
|
" Check if the flag is available and set to 0 to disable checking for and
|
|
|
|
" emitting conflicting plugin warnings.
|
|
|
|
if exists('g:ale_emit_conflict_warnings') && !g:ale_emit_conflict_warnings
|
2017-03-06 18:15:28 -05:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2017-03-30 11:37:28 -04:00
|
|
|
" Conflicting Plugins Checks
|
|
|
|
|
2017-03-06 18:15:28 -05:00
|
|
|
function! s:GetConflictingPluginWarning(plugin_name) abort
|
|
|
|
return 'ALE conflicts with ' . a:plugin_name
|
|
|
|
\ . '. Uninstall it, or disable this warning with '
|
|
|
|
\ . '`let g:ale_emit_conflict_warnings = 0` in your vimrc file, '
|
|
|
|
\ . '*before* plugins are loaded.'
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
if exists('g:loaded_syntastic_plugin')
|
|
|
|
throw s:GetConflictingPluginWarning('Syntastic')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists('g:loaded_neomake')
|
|
|
|
throw s:GetConflictingPluginWarning('Neomake')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists('g:loaded_validator_plugin')
|
|
|
|
throw s:GetConflictingPluginWarning('Validator')
|
|
|
|
endif
|