aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
authorPascal Kuthe2023-03-19 21:05:53 +0000
committerBlaž Hrastnik2023-03-22 05:33:08 +0000
commit47420db516ced2630e3b9c68b430e5f769947878 (patch)
tree9d1c8bf248749986795e631fab80ac7996b4361f /helix-lsp
parent617f09adc4544a653b482139c8fef33c67fbfad5 (diff)
accept empty snippet regex replace elements
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/snippet.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-lsp/src/snippet.rs b/helix-lsp/src/snippet.rs
index e59351a4..5bfe9657 100644
--- a/helix-lsp/src/snippet.rs
+++ b/helix-lsp/src/snippet.rs
@@ -311,9 +311,9 @@ mod parser {
seq!(
"/",
// TODO parse as ECMAScript and convert to rust regex
- non_empty(text(&['/'], &['/'])),
+ text(&['/'], &['/']),
"/",
- one_or_more(choice!(
+ zero_or_more(choice!(
format(),
// text doesn't parse $, if format fails we just accept the $ as text
map("$", |_| FormatItem::Text("$".into())),