fixing package manager issues

This commit is contained in:
Nate Stemen 2017-10-20 11:54:03 +01:00
parent 5b1836c639
commit 0ebda89efe
2 changed files with 21 additions and 18 deletions

View file

@ -1,10 +1,11 @@
define [
"ide/editor/directives/aceEditor/auto-complete/CommandManager"
"ide/editor/directives/aceEditor/auto-complete/EnvironmentManager"
"ide/editor/directives/aceEditor/auto-complete/PackageManager"
"ide/editor/directives/aceEditor/auto-complete/Helpers"
"ace/ace"
"ace/ext-language_tools"
], (CommandManager, EnvironmentManager, Helpers) ->
], (CommandManager, EnvironmentManager, PackageManager, Helpers) ->
Range = ace.require("ace/range").Range
aceSnippetManager = ace.require('ace/snippets').snippetManager
@ -35,6 +36,7 @@ define [
})
SnippetCompleter = new EnvironmentManager()
PackageCompleter = new PackageManager()
Graphics = @graphics
Preamble = @preamble
@ -126,10 +128,11 @@ define [
callback null, result
@editor.completers = [
@suggestionManager,
SnippetCompleter,
ReferencesCompleter,
LabelsCompleter,
@suggestionManager
SnippetCompleter
PackageCompleter
ReferencesCompleter
LabelsCompleter
GraphicsCompleter
]

View file

@ -12,7 +12,7 @@ define [], () ->
'Lambda', 'Xi', 'Pi', 'Sigma', 'Upsilon', 'Phi', 'Psi', 'Omega'
]
singleArgumentCommands = [
'chapter', 'usepackage', 'section', 'label', 'textbf', 'subsection',
'chapter', 'section', 'label', 'textbf', 'subsection',
'vspace', 'cite', 'textit', 'documentclass', 'includegraphics', 'input',
'emph','caption', 'ref', 'title', 'author', 'texttt', 'include',
'hspace', 'bibitem', 'url', 'large', 'subsubsection', 'textsc', 'date',
@ -30,7 +30,7 @@ define [], () ->
]
special = ['LaTeX', 'TeX']
rawCommands = [].concat(
rawCommands = ['usepackage'].concat(
noArgumentCommands,
singleArgumentCommands,
doubleArgumentCommands,
@ -63,19 +63,19 @@ define [], () ->
meta: "cmd"
}
special = for cmd in special
{
caption: "\\#{cmd}{}"
snippet: "\\#{cmd}{}"
meta: "cmd"
}
{
caption: "\\#{cmd}{}"
snippet: "\\#{cmd}{}"
meta: "cmd"
}
staticCommands = [].concat(
noArgumentCommands,
singleArgumentCommands,
doubleArgumentCommands,
tripleArgumentCommands,
special
)
noArgumentCommands,
singleArgumentCommands,
doubleArgumentCommands,
tripleArgumentCommands,
special
)
class Parser
constructor: (@doc, @prefix) ->