diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-19 19:29:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-19 19:29:46 +0100 |
commit | 1bc1f28bc58b2dbcf8f8f548c277e2c90e3075cd (patch) | |
tree | 7d059b65919b1b64196cc3fc6830eeb99f2f9af0 /crates/ra_ide/src/lib.rs | |
parent | 131849f2abd94dc8143f0c5d65e022136f29561a (diff) | |
parent | 3e9bf7ebabdaa8e9a2972af2dd8e8089a3a0341e (diff) |
Merge #4494
4494: Support snippet text edit r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 78149ddfc..66125f2f5 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -82,7 +82,7 @@ pub use crate::{ | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | pub use hir::Documentation; | 84 | pub use hir::Documentation; |
85 | pub use ra_assists::AssistId; | 85 | pub use ra_assists::{AssistConfig, AssistId}; |
86 | pub use ra_db::{ | 86 | pub use ra_db::{ |
87 | Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRootId, | 87 | Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRootId, |
88 | }; | 88 | }; |
@@ -458,17 +458,17 @@ impl Analysis { | |||
458 | /// Computes completions at the given position. | 458 | /// Computes completions at the given position. |
459 | pub fn completions( | 459 | pub fn completions( |
460 | &self, | 460 | &self, |
461 | position: FilePosition, | ||
462 | config: &CompletionConfig, | 461 | config: &CompletionConfig, |
462 | position: FilePosition, | ||
463 | ) -> Cancelable<Option<Vec<CompletionItem>>> { | 463 | ) -> Cancelable<Option<Vec<CompletionItem>>> { |
464 | self.with_db(|db| completion::completions(db, position, config).map(Into::into)) | 464 | self.with_db(|db| completion::completions(db, config, position).map(Into::into)) |
465 | } | 465 | } |
466 | 466 | ||
467 | /// Computes assists (aka code actions aka intentions) for the given | 467 | /// Computes assists (aka code actions aka intentions) for the given |
468 | /// position. | 468 | /// position. |
469 | pub fn assists(&self, frange: FileRange) -> Cancelable<Vec<Assist>> { | 469 | pub fn assists(&self, config: &AssistConfig, frange: FileRange) -> Cancelable<Vec<Assist>> { |
470 | self.with_db(|db| { | 470 | self.with_db(|db| { |
471 | ra_assists::Assist::resolved(db, frange) | 471 | ra_assists::Assist::resolved(db, config, frange) |
472 | .into_iter() | 472 | .into_iter() |
473 | .map(|assist| Assist { | 473 | .map(|assist| Assist { |
474 | id: assist.assist.id, | 474 | id: assist.assist.id, |