Skip to content

Commit

Permalink
added link to lsp snippet spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Mar 23, 2024
1 parent 957dee9 commit 692547b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/text/snippet.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 692547b

Please sign in to comment.