onDidOpenTextDocument property

Event<TextDocument> get onDidOpenTextDocument

An event that is emitted when a {@link TextDocumenttext document} is opened or when the language id of a text document {@link languages.setTextDocumentLanguagehas been changed}.

To add an event listener when a visible text document is opened, use the {@link TextEditor} events in the {@link window} namespace. Note that:

  • The event is emitted before the {@link TextDocumentdocument} is updated in the {@link window.activeTextEditoractive text editor}
  • When a {@link TextDocumenttext document} is already open (e.g.: open in another {@link window.visibleTextEditorsvisible text editor}) this event is not emitted

Implementation

_i3.Event<_i3.TextDocument> get onDidOpenTextDocument => _i4.getProperty(
      this,
      'onDidOpenTextDocument',
    );