From 85c9dbf6036978a3f021f0e29de47116360dea34 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Sun, 19 Mar 2023 22:06:29 +0100 Subject: accept bracket snippet variables without default --- helix-lsp/src/snippet.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helix-lsp/src/snippet.rs b/helix-lsp/src/snippet.rs index 5bfe9657..a11ff60f 100644 --- a/helix-lsp/src/snippet.rs +++ b/helix-lsp/src/snippet.rs @@ -388,6 +388,12 @@ mod parser { default: None, regex: None, }), + // ${var} + map(seq!("${", var(), "}",), |values| SnippetElement::Variable { + name: values.1, + default: None, + regex: None, + }), // ${var:default} map( seq!( -- cgit v1.2.3-70-g09d2