You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dynamic registration of file operations is ignored, although fileOperations.dynamicRegistration is announced #2251
LSP4IJ announces workspace.fileOperations.dynamicRegistration: true (ClientCapabilitiesFactory, line 88). But a server that registers file operations dynamically never gets them. LSP4IJ doesn't send workspace/didCreateFiles, didRenameFiles, didDeleteFiles or willRenameFiles to it, so the server never learns of created, renamed or deleted files, and a rename doesn't apply the server's edits.
Cause
LanguageServerWrapper.registerCapability handles these registrations:
workspace/didChangeWorkspaceFolders;
workspace/didChangeWatchedFiles;
workspace/textDocumentContent;
workspace/executeCommand;
text document features, through LSPClientFeatures.getCapabilityRegistry.
It has no branch for the file operation methods: workspace/willCreateFiles, didCreateFiles, willRenameFiles, didRenameFiles, willDeleteFiles and didDeleteFiles. Their FileOperationRegistrationOptions are dropped, and LSP4IJ only uses the file operation filters of the server's static capabilities.
Fix
Register the filters of a dynamic file operation registration next to the static ones, and remove them on unregisterCapability, for the operations that LSP4IJ supports. That's willCreate and willDelete only once those are announced. Otherwise, announce dynamicRegistration: false. Test it with a mock server that registers workspace/didRenameFiles dynamically, and check that a rename is sent to it.
Activity
fix: file creations, renames and deletions reach a language server th…