mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Rename Snippets -> SnippetManager
This commit is contained in:
parent
7cc3f7613e
commit
115734f82e
2 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
define [
|
||||
"ide/editor/directives/aceEditor/auto-complete/SuggestionManager"
|
||||
"ide/editor/directives/aceEditor/auto-complete/Snippets"
|
||||
"ide/editor/directives/aceEditor/auto-complete/SnippetManager"
|
||||
"ace/ace"
|
||||
"ace/ext-language_tools"
|
||||
], (SuggestionManager, SnippetManager) ->
|
||||
|
|
|
@ -9,7 +9,7 @@ define () ->
|
|||
"verbatim"
|
||||
]
|
||||
|
||||
snippets = for env in environments
|
||||
staticSnippets = for env in environments
|
||||
{
|
||||
caption: "\\begin{#{env}}..."
|
||||
snippet: """
|
||||
|
@ -20,7 +20,7 @@ define () ->
|
|||
meta: "env"
|
||||
}
|
||||
|
||||
snippets = snippets.concat [{
|
||||
staticSnippets = staticSnippets.concat [{
|
||||
caption: "\\begin{array}..."
|
||||
snippet: """
|
||||
\\begin{array}{${1:cc}}
|
||||
|
@ -96,9 +96,10 @@ define () ->
|
|||
"""
|
||||
meta: "env"
|
||||
}]
|
||||
|
||||
class SnippetManager
|
||||
getCompletions: (editor, session, pos, prefix, callback) ->
|
||||
console.log ">> get snippet completions"
|
||||
callback null, snippets
|
||||
callback null, staticSnippets
|
||||
|
||||
return SnippetManager
|
Loading…
Reference in a new issue