Check for rename support before showing LSP rename prompt (#9277)
This commit is contained in:
parent
4da6191a1c
commit
0cbd8d3df1
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue