Add the custom environments to the list of snippets

This commit is contained in:
Shane Kilkelly 2016-03-17 11:23:53 +00:00
parent c25c2b676a
commit eebd25351d

View file

@ -115,6 +115,19 @@ define () ->
docText = session.getValue()
customEnvironmentNames = parseCustomEnvironmentNames(docText)
# console.log customEnvironmentNames
callback null, staticSnippets
snippets = staticSnippets.concat(
customEnvironmentNames.map (name) ->
{
caption: "\\begin{#{name}}..."
snippet: """
\\begin{#{name}}
\t$1
\\end{#{name}}
"""
meta: "env"
}
)
callback null, snippets
return SnippetManager