From 692547bc6372cfde4835b3c5fa1ee229418cc68b Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Sat, 23 Mar 2024 21:40:39 +0100 Subject: [PATCH] added link to lsp snippet spec --- src/text/snippet.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/text/snippet.nim b/src/text/snippet.nim index 700fb832..21deee9a 100644 --- a/src/text/snippet.nim +++ b/src/text/snippet.nim @@ -84,6 +84,9 @@ func `$`*(t: Token): string = return "$" & $t.tabStopIndex & "(" & t.tokens.join(" | ") & ")" let snippetParser = peg("snippet", state: Snippet): + ## LSP snippet parser + ## See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax + snippet <- *(escaped | (unescaped - '$') | pattern) * snippetEnd snippetEnd <- !1: