Check for rename support before showing LSP rename prompt (#9277)

pull/9291/head
Michael Davis 11 months ago committed by GitHub
parent 4da6191a1c
commit 0cbd8d3df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1421,6 +1421,16 @@ pub fn rename_symbol(cx: &mut Context) {
let (view, doc) = current_ref!(cx.editor);
if doc
.language_servers_with_feature(LanguageServerFeature::RenameSymbol)
.next()
.is_none()
{
cx.editor
.set_error("No configured language server supports symbol renaming");
return;
}
let language_server_with_prepare_rename_support = doc
.language_servers_with_feature(LanguageServerFeature::RenameSymbol)
.find(|ls| {

Loading…
Cancel
Save