diagnostics.onParse: semi-real time diagnostics that reported when a file is indexed or prepared for code completion diagnostics.onCodeComplete: real time diagnostics that are reported as you type