@@ -64,6 +64,7 @@ pub fn into_transaction<'a>(
64 edit: &lsp_types::TextEdit,
64 edit: &lsp_types::TextEdit,
65 line_ending: &str,
65 line_ending: &str,
66 offset_encoding: OffsetEncoding,
66 offset_encoding: OffsetEncoding,
67+ include_placeholer: bool,
67) -> helix_core::Transaction {
68) -> helix_core::Transaction {
68 use helix_core::{smallvec, Range, Selection, Transaction};
69 use helix_core::{smallvec, Range, Selection, Transaction};
69 use SnippetElement::*;
70 use SnippetElement::*;
@@ -119,10 +120,14 @@ pub fn into_transaction<'a>(
119 // https://doc.rust-lang.org/beta/unstable-book/language-features/box-patterns.html
120 // https://doc.rust-lang.org/beta/unstable-book/language-features/box-patterns.html
120 // would make this a bit nicer
121 // would make this a bit nicer
121 Text(text) => {
122 Text(text) => {
123+ if include_placeholer {
122− let len_chars = text.chars().count();
124+ let len_chars = text.chars().count();
123− tabstops.push((tabstop, Range::new(offset, offset + len_chars + 1)));
125+ tabstops.push((tabstop, Range::new(offset, offset + len_chars + 1)));
124− offset += len_chars;
126+ offset += len_chars;
125− insert.push_str(text);
127+ insert.push_str(text);
129+ tabstops.push((tabstop, Range::point(offset)));
127 other => {
132 other => {
128 log::error!(
133 log::error!(