closeDocument method

Future<void> closeDocument(
  1. String filePath
)

Updates the document in the LSP server if there is any change. /// This method is used internally by the CodeForge widget and calling it directly is not recommended.

Implementation

Future<void> closeDocument(String filePath) async {
  if (!_openDocuments.containsKey(filePath)) return;

  await _sendNotification(
    method: 'textDocument/didClose',
    params: {
      'textDocument': {'uri': Uri.file(filePath).toString()},
    },
  );
  _openDocuments.remove(filePath);
}