updateDocument method
Implementation
Future<void> updateDocument(String content) async {
if (!_openDocuments.containsKey(filePath)) {
return;
}
final version = _openDocuments[filePath]! + 1;
_openDocuments[filePath] = version;
await _sendNotification(
method: 'textDocument/didChange',
params: {
'textDocument': {
'uri': Uri.file(filePath).toString(),
'version': version,
},
'contentChanges': [
{'text': content},
],
},
);
}