This does unneeded extra work: we can just call `LanguageManager.getLanguageForPath()` and skip the `getSmartFileExtension()` call.