saveDocument method

Future<void> saveDocument(
  1. String content
)

Saves the document in the LSP server.

Sends a 'didSave' notification to the LSP server with the current content.

Implementation

Future<void> saveDocument(String content) async {
  await _sendNotification(
    method: 'textDocument/didSave',
    params: {
      'textDocument': {'uri': Uri.file(filePath).toString()},
      'text': content,
    },
  );
}