diff options
author | w0rp <devw0rp@gmail.com> | 2018-03-03 17:50:09 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-03-03 17:50:09 +0000 |
commit | f476c28b296ccd6322067756c5215707ee57f408 (patch) | |
tree | a8b359ad392a792024a82c9830490bd74bd8dfe4 | |
parent | 08cfd5f90c8113f4db25f60833b690665046b495 (diff) | |
download | ale-f476c28b296ccd6322067756c5215707ee57f408.zip |
Add deprecation warnings for old NeoVim versions and old functions
-rw-r--r-- | autoload/ale/statusline.vim | 5 | ||||
-rw-r--r-- | plugin/ale.vim | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/autoload/ale/statusline.vim b/autoload/ale/statusline.vim index a073f7a0..adb35e7e 100644 --- a/autoload/ale/statusline.vim +++ b/autoload/ale/statusline.vim @@ -95,6 +95,11 @@ endfunction " This function is deprecated, and should not be used. Use the airline plugin " instead, or write your own status function with ale#statusline#Count() function! ale#statusline#Status() abort + if !get(g:, 'ale_deprecation_ale_statusline_status', 0) + echom 'ale#statusline#Status() is deprecated, use ale#statusline#Count() to write your own function.' + let g:ale_deprecation_ale_statusline_status = 1 + endif + if !exists('g:ale_statusline_format') return 'OK' endif diff --git a/plugin/ale.vim b/plugin/ale.vim index 1a473df1..0ca76177 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -32,6 +32,11 @@ if !s:has_features finish endif +if has('nvim') && !has('nvim-0.2.0') && !get(g:, 'ale_use_deprecated_neovim') + echom 'ALE support for NeoVim versions below 0.2.0 is deprecated.' + echom 'Use `let g:ale_use_deprecated_neovim = 1` to silence this warning for now.' +endif + " This flag can be set to 0 to disable emitting conflict warnings. let g:ale_emit_conflict_warnings = get(g:, 'ale_emit_conflict_warnings', 1) @@ -298,9 +303,19 @@ augroup END " Backwards Compatibility function! ALELint(delay) abort + if !get(g:, 'ale_deprecation_ale_lint', 0) + echom 'ALELint() is deprecated, use ale#Queue() instead.' + let g:ale_deprecation_ale_lint = 1 + endif + call ale#Queue(a:delay) endfunction function! ALEGetStatusLine() abort + if !get(g:, 'ale_deprecation_ale_get_status_line', 0) + echom 'ALEGetStatusLine() is deprecated.' + let g:ale_deprecation_ale_get_status_line = 1 + endif + return ale#statusline#Status() endfunction |