mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 02:46:17 +04:00
Check for rename support before showing LSP rename prompt (#9277)
This commit is contained in:
parent
4da6191a1c
commit
0cbd8d3df1
@ -1421,6 +1421,16 @@ fn create_rename_prompt(
|
||||
|
||||
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…
Reference in New Issue
Block a user