mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Simplify import edit calculation
This commit is contained in:
parent
68a747efe0
commit
f6d2540df0
12 changed files with 116 additions and 113 deletions
|
@ -36,12 +36,10 @@ impl CompletionConfig {
|
|||
self.snippet_cap = if yes { Some(SnippetCap { _private: () }) } else { None }
|
||||
}
|
||||
|
||||
/// Whether the completions' additional edits are calculated later, during a resolve request or not.
|
||||
/// See `CompletionResolveCapability` for the details.
|
||||
pub fn resolve_edits_immediately(&self) -> bool {
|
||||
!self
|
||||
.active_resolve_capabilities
|
||||
.contains(&CompletionResolveCapability::AdditionalTextEdits)
|
||||
/// Whether the completions' additional edits are calculated when sending an initional completions list
|
||||
/// or later, in a separate resolve request.
|
||||
pub fn resolve_additional_edits_lazily(&self) -> bool {
|
||||
self.active_resolve_capabilities.contains(&CompletionResolveCapability::AdditionalTextEdits)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue