SIGN IN SIGN UP

Try to avoid opening text documents just to process diagnostics

To handle JS/TS diagnostics, we currently use the language mode of an open text document. This should always be correct, but also causes us to open text documents that we don't need to

This change instead tries using the file extension first before falling back to use the text document. Using the file extension is not strictly correct since users can setup weird file associations, but should be ok for the vast majority of use cases

Investigated as part of #101885
M
Matt Bierner committed
2ae9352ae33ced58772683b60d961c604c9576ff
Parent: 8fc2a8d