setDocumentSource abstract method

Future<HighlightResult> setDocumentSource(
  1. String scriptId,
  2. String scriptName,
  3. String source, {
  4. required String formatScriptId,
  5. required String formatExtension,
  6. bool highlight = false,
})

Set a custom format document source. Same as setScriptSource but marks the script as a document handled by the FileFormat protocol script with formatScriptId. Highlight, problems, autocomplete, hover, and format requests dispatch to that handler inside the workspace. An empty formatScriptId registers the document with no intelligence.

Implementation

Future<HighlightResult> setDocumentSource(
  String scriptId,
  String scriptName,
  String source, {
  required String formatScriptId,
  required String formatExtension,
  bool highlight = false,
});