mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'sk-ac-rank-exact-match-highest' into sk-ac-improvements-integration
This commit is contained in:
commit
330e3dccc3
2 changed files with 11 additions and 11 deletions
|
@ -63,14 +63,14 @@ define [
|
|||
caption: "\\#{commandName}{}",
|
||||
snippet: "\\#{commandName}{}",
|
||||
meta: "cross-reference",
|
||||
score: 11000
|
||||
score: 60
|
||||
}
|
||||
for label in labelsManager.getAllLabels()
|
||||
result.push {
|
||||
caption: "\\#{commandName}{#{label}#{if needsClosingBrace then '}' else ''}",
|
||||
value: "\\#{commandName}{#{label}#{if needsClosingBrace then '}' else ''}",
|
||||
meta: "cross-reference",
|
||||
score: 10000
|
||||
score: 50
|
||||
}
|
||||
callback null, result
|
||||
|
||||
|
@ -97,7 +97,7 @@ define [
|
|||
caption: "\\#{commandName}{}",
|
||||
snippet: "\\#{commandName}{}",
|
||||
meta: "reference",
|
||||
score: 11000
|
||||
score: 60
|
||||
}
|
||||
if references.keys and references.keys.length > 0
|
||||
references.keys.forEach (key) ->
|
||||
|
@ -106,7 +106,7 @@ define [
|
|||
caption: "\\#{commandName}{#{previousArgsCaption}#{key}#{if needsClosingBrace then '}' else ''}",
|
||||
value: "\\#{commandName}{#{previousArgs}#{key}#{if needsClosingBrace then '}' else ''}",
|
||||
meta: "reference",
|
||||
score: 10000
|
||||
score: 50
|
||||
})
|
||||
callback null, result
|
||||
else
|
||||
|
|
|
@ -80,10 +80,10 @@ define [], () ->
|
|||
doc = session.getValue()
|
||||
parser = new Parser(doc)
|
||||
commands = parser.parse()
|
||||
|
||||
completions = []
|
||||
for command in commands
|
||||
caption = "\\#{command[0]}"
|
||||
score = if prefix == caption then 99 else 50
|
||||
snippet = caption
|
||||
i = 1
|
||||
_.times command[1], () ->
|
||||
|
@ -94,12 +94,12 @@ define [], () ->
|
|||
snippet += "{${#{i}}}"
|
||||
caption += "{}"
|
||||
i++
|
||||
unless caption == prefix
|
||||
completions.push {
|
||||
caption: caption
|
||||
snippet: snippet
|
||||
meta: "cmd"
|
||||
}
|
||||
completions.push {
|
||||
caption: caption
|
||||
snippet: snippet
|
||||
meta: "cmd"
|
||||
score: score
|
||||
}
|
||||
|
||||
callback null, completions
|
||||
|
||||
|
|
Loading…
Reference in a new issue