mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Rename Snippets -> SnippetManager
This commit is contained in:
+1
-1
@@ -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) ->
|
||||
|
||||
+4
-3
@@ -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
|
||||
Reference in New Issue
Block a user