Prevent being able to rename items that are not part of the workspace

This commit is contained in:
Lukas Wirth
2021-04-16 17:31:47 +02:00
parent 75371eb0fa
commit c447a795ab
10 changed files with 92 additions and 15 deletions

View File

@@ -400,6 +400,17 @@ impl Config {
pub fn will_rename(&self) -> bool {
try_or!(self.caps.workspace.as_ref()?.file_operations.as_ref()?.will_rename?, false)
}
pub fn change_annotation_support(&self) -> bool {
try_!(self
.caps
.workspace
.as_ref()?
.workspace_edit
.as_ref()?
.change_annotation_support
.as_ref()?)
.is_some()
}
pub fn code_action_resolve(&self) -> bool {
try_or!(
self.caps