mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
* fix: avoid additional text_edit * unify redundant to_lsp_snippet * fix: remove redundant default_postfix_snippet * fix: with single complete * clean import * chore: revert move to_lsp_snippet
This commit is contained in:
parent
b1bb3196b7
commit
5f8a11bdc0
1 changed files with 5 additions and 3 deletions
|
@ -227,13 +227,15 @@ impl CompletionContext<'_> {
|
|||
let node_content = node.get().clone().into_text();
|
||||
let before = TextEdit {
|
||||
range: self.ctx.to_lsp_range(rng.start..self.from, &src),
|
||||
new_text: node_before_before_cursor.into(),
|
||||
new_text: String::new(),
|
||||
};
|
||||
|
||||
self.completions.push(Completion {
|
||||
apply: Some(eco_format!("{node_before}{node_content}{node_after}")),
|
||||
apply: Some(eco_format!(
|
||||
"{node_before_before_cursor}{node_before}{node_content}{node_after}"
|
||||
)),
|
||||
additional_text_edits: Some(vec![before]),
|
||||
..base.clone()
|
||||
..base
|
||||
});
|
||||
} else {
|
||||
let before = TextEdit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue