This creates a new string that is formatted using the diagnostics
line number, column, severity, and message text in the format
“line:column: severity: message”.
This can be convenient when wanting to quickly display a
diagnostic such as in a tooltip.