Included usage example for error/warning getters

This commit is contained in:
Kenny Kaye 2015-12-05 11:06:29 -08:00
parent 908fd68548
commit 0c55527a38
2 changed files with 12 additions and 0 deletions

View File

@ -1135,6 +1135,11 @@ For example:
call youcompleteme#GetErrorCount() call youcompleteme#GetErrorCount()
``` ```
Both this function and `youcompleteme#GetWarningCount` can be useful when
integrating YCM with other Vim plugins. For example, a [lightline][] user could
add a diagnostics section to their statusline which would display the number of
errors and warnings.
### The `youcompleteme#GetWarningCount` function ### The `youcompleteme#GetWarningCount` function
Get the number of YCM Diagnostic warnings. If no warnings are present, this Get the number of YCM Diagnostic warnings. If no warnings are present, this
@ -2373,6 +2378,7 @@ This software is licensed under the [GPL v3 license][gpl].
[gpl]: http://www.gnu.org/copyleft/gpl.html [gpl]: http://www.gnu.org/copyleft/gpl.html
[vim]: http://www.vim.org/ [vim]: http://www.vim.org/
[syntastic]: https://github.com/scrooloose/syntastic [syntastic]: https://github.com/scrooloose/syntastic
[lightline]: https://github.com/itchyny/lightline.vim
[flags_example]: https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py [flags_example]: https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py
[compdb]: http://clang.llvm.org/docs/JSONCompilationDatabase.html [compdb]: http://clang.llvm.org/docs/JSONCompilationDatabase.html
[subsequence]: https://en.wikipedia.org/wiki/Subsequence [subsequence]: https://en.wikipedia.org/wiki/Subsequence

View File

@ -1363,6 +1363,11 @@ For example:
> >
call youcompleteme#GetErrorCount() call youcompleteme#GetErrorCount()
< <
Both this function and |youcompleteme#GetWarningCount| can be useful when
integrating YCM with other Vim plugins. For example, a lightline [48] user
could add a diagnostics section to their statusline which would display the
number of errors and warnings.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *youcompleteme#GetWarningCount* function The *youcompleteme#GetWarningCount* function
@ -2627,5 +2632,6 @@ References ~
[45] http://www.gnu.org/copyleft/gpl.html [45] http://www.gnu.org/copyleft/gpl.html
[46] https://bitdeli.com/free [46] https://bitdeli.com/free
[47] https://d2weczhvl823v0.cloudfront.net/Valloric/youcompleteme/trend.png [47] https://d2weczhvl823v0.cloudfront.net/Valloric/youcompleteme/trend.png
[48] https://github.com/itchyny/lightline.vim
vim: ft=help vim: ft=help