setTextDocumentLanguage method

Future setTextDocumentLanguage(
  1. TextDocument document,
  2. String languageId
)

Set (and change) the {@link TextDocument.languageIdlanguage} that is associated with the given document.

Note that calling this function will trigger the {@linkcode workspace.onDidCloseTextDocumentonDidCloseTextDocument} event followed by the {@linkcode workspace.onDidOpenTextDocumentonDidOpenTextDocument} event.

Implementation

_i2.Future<_i2.dynamic> setTextDocumentLanguage(
  _i3.TextDocument document,
  _i2.String languageId,
) =>
    _i4.promiseToFuture(_i4.callMethod(
      this,
      'setTextDocumentLanguage',
      [
        document,
        languageId,
      ],
    ));