title: How do I detect a change to the language in a document in Visual Studio Code
body: <p>There are a number of events for detecting when a document is focused <code>window.onDidChangeActiveTextEditor</code> or when a document's content or metadata is changed (e.g. <code>workspace.onDidChangeTextDocument</code>), but is there any way to detect when the syntax language of a file has changed?</p>
  
  <p>The property is available under <code>window.activeTextEditor.document.languageId</code>, but I can't seem to find a way to detect when this value changes.</p>