diff options
author | Kirill Bulatov <[email protected]> | 2020-12-02 21:55:35 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-12-07 21:41:08 +0000 |
commit | d9bd1f171dde11ff04f0619b14d8f25e5e4fc56e (patch) | |
tree | f5dde9ec4ee81337b0c87bb5e547dd3401f8fffd /crates/completion/src/config.rs | |
parent | 2a7be4afb000d97948bb7f11bcd074fc1e11716e (diff) |
Add eager resolve capability
Diffstat (limited to 'crates/completion/src/config.rs')
-rw-r--r-- | crates/completion/src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/completion/src/config.rs b/crates/completion/src/config.rs index 736af455e..e9a02aeb8 100644 --- a/crates/completion/src/config.rs +++ b/crates/completion/src/config.rs | |||
@@ -29,6 +29,10 @@ impl CompletionConfig { | |||
29 | pub fn allow_snippets(&mut self, yes: bool) { | 29 | pub fn allow_snippets(&mut self, yes: bool) { |
30 | self.snippet_cap = if yes { Some(SnippetCap { _private: () }) } else { None } | 30 | self.snippet_cap = if yes { Some(SnippetCap { _private: () }) } else { None } |
31 | } | 31 | } |
32 | |||
33 | pub fn should_resolve_immediately(&self) -> bool { | ||
34 | !self.resolve_capabilities.contains(&CompletionResolveCapability::AdditionalTextEdits) | ||
35 | } | ||
32 | } | 36 | } |
33 | 37 | ||
34 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | 38 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |