Add support for rename with language servers that lack prepareRename (#23000)
This adds support for LSPs that use the old rename flow which does not first ask the LSP for the rename range and check that it is a valid range to rename. Closes #16663 Release Notes: * Fixed rename symbols action when the language server does not have the capability to prepare renames - such as `luau-lsp`.
This commit is contained in:
@@ -4135,7 +4135,10 @@ async fn test_rename(cx: &mut gpui::TestAppContext) {
|
||||
.next()
|
||||
.await
|
||||
.unwrap();
|
||||
let range = response.await.unwrap().unwrap();
|
||||
let response = response.await.unwrap();
|
||||
let PrepareRenameResponse::Success(range) = response else {
|
||||
panic!("{:?}", response);
|
||||
};
|
||||
let range = buffer.update(cx, |buffer, _| range.to_offset(buffer));
|
||||
assert_eq!(range, 6..9);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user