mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
health.vim: rename "suggestions" to "advice" in most places
This commit is contained in:
parent
c4ab110e04
commit
2a5a6a0541
@ -96,21 +96,21 @@ endfunction
|
||||
" Format a message for a specific report item
|
||||
function! s:format_report_message(status, msg, ...) abort " {{{
|
||||
let output = ' - ' . a:status . ': ' . s:indent_after_line1(a:msg, 4)
|
||||
let suggestions = []
|
||||
let advice = []
|
||||
|
||||
" Optional parameters
|
||||
if a:0 > 0
|
||||
let suggestions = type(a:1) == type("") ? [a:1] : a:1
|
||||
if type(suggestions) != type([])
|
||||
let advice = type(a:1) == type("") ? [a:1] : a:1
|
||||
if type(advice) != type([])
|
||||
throw "Expected String or List"
|
||||
endif
|
||||
endif
|
||||
|
||||
" Report each suggestion
|
||||
if len(suggestions) > 0
|
||||
if len(advice) > 0
|
||||
let output .= "\n - ADVICE:"
|
||||
endif
|
||||
for suggestion in suggestions
|
||||
for suggestion in advice
|
||||
let output .= "\n - " . s:indent_after_line1(suggestion, 10)
|
||||
endfor
|
||||
|
||||
|
@ -64,11 +64,11 @@ health#report_info({msg}) *health#report_info*
|
||||
health#report_ok({msg}) *health#report_ok*
|
||||
Displays a "success" message.
|
||||
|
||||
health#report_warn({msg}, [{suggestions}]) *health#report_warn*
|
||||
Displays a warning. {suggestions} is an optional List of suggestions.
|
||||
health#report_warn({msg}, [{advice}]) *health#report_warn*
|
||||
Displays a warning. {advice} is an optional List of suggestions.
|
||||
|
||||
health#report_error({msg}, [{suggestions}]) *health#report_error*
|
||||
Displays an error. {suggestions} is an optional List of suggestions.
|
||||
health#report_error({msg}, [{advice}]) *health#report_error*
|
||||
Displays an error. {advice} is an optional List of suggestions.
|
||||
|
||||
health#{plugin}#check() *health.user_checker*
|
||||
This is the form of a healthcheck definition. Call the above functions
|
||||
|
Loading…
Reference in New Issue
Block a user