lsp: Add support for didRename/willRename LSP messages (#21651)

Closes #21564

Notably, RA will now rename module references if you change the source
file name via our project panel.

This PR is a tad bigger than necessary as I torn out the Model<> from
didSave watchers (I tried to reuse that code for the same purpose).
Release Notes:

- Added support for language server actions being executed on file
rename.
This commit is contained in:
Piotr Osiewicz 2024-12-07 13:08:18 +01:00 committed by GitHub
parent 14ba4a9c94
commit f561a91daf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 537 additions and 106 deletions

View file

@ -638,6 +638,12 @@ impl LanguageServer {
snippet_edit_support: Some(true),
..WorkspaceEditClientCapabilities::default()
}),
file_operations: Some(WorkspaceFileOperationsClientCapabilities {
dynamic_registration: Some(false),
did_rename: Some(true),
will_rename: Some(true),
..Default::default()
}),
..Default::default()
}),
text_document: Some(TextDocumentClientCapabilities {