closeDocument method
Updates the document in the LSP server if there is any change.
///
This method is used internally by the CodeCrafter widget and calling it directly is not recommended.
Implementation
Future<void> closeDocument() async {
if (!_openDocuments.containsKey(filePath)) return;
await _sendNotification(
method: 'textDocument/didClose',
params: {
'textDocument': {'uri': Uri.file(filePath).toString()},
},
);
_openDocuments.remove(filePath);
}