setTextDocumentLanguageAsync
fun setTextDocumentLanguageAsync(document: TextDocument, languageId: String): PromiseLike<TextDocument>(source)
Set (and change) the language that is associated with the given document.
Note that calling this function will trigger the {@linkcode workspace.onDidCloseTextDocument onDidCloseTextDocument} event followed by the {@linkcode workspace.onDidOpenTextDocument onDidOpenTextDocument} event.
Parameters
document
The document which language is to be changed
languageId
The new language identifier.