The server capabilities for each of the the didXXXfiles and willXXXFiles notifications are currently constructed as follows
did_delete = (
get_capability(self.client_capabilities, 'workspace.fileOperations.didDelete')
if WORKSPACE_DID_DELETE_FILES in self.features
else None
)
if did_delete is not None:
file_operations.did_delete = did_delete
which results in did_delete taking the value of True or None.
Instead it should be an instance of FileOperationRegistrationOptions which allows the server to declare which files it is interested in.
I have a (partial) fix in esbonio for just the did delete files notification.
if WORKSPACE_DID_DELETE_FILES in self.fm.features:
opts = self.fm.feature_options.get(WORKSPACE_DID_DELETE_FILES, None)
if opts:
value.workspace.file_operations.did_delete = opts # type: ignore
I've been meaning to update it for all the file operation notifications and upstream it for a while but just haven't got around to it - so if someone else feels they have time to pick this up then go for it! :smile:
The server capabilities for each of the the didXXXfiles and willXXXFiles notifications are currently constructed as follows
which results in
did_delete
taking the value ofTrue
orNone
.Instead it should be an instance of
FileOperationRegistrationOptions
which allows the server to declare which files it is interested in.I have a (partial) fix in
esbonio
for just the did delete files notification.Which allows the following usage pattern
I've been meaning to update it for all the file operation notifications and upstream it for a while but just haven't got around to it - so if someone else feels they have time to pick this up then go for it! :smile: