mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Give some API properties priority in autocomplete.
This commit is contained in:
parent
6e1cb8a1d1
commit
da92e15bfb
2 changed files with 7 additions and 0 deletions
|
@ -91,6 +91,12 @@ PropertyDocumentationSchema = c.object {
|
|||
{title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000}
|
||||
]
|
||||
i18n: { type: 'object', format: 'i18n', props: ['description'], description: 'Help translate this return value'}
|
||||
autoCompletePriority:
|
||||
type: 'number'
|
||||
title: 'Autocomplete Priority'
|
||||
description: 'How important this property is to autocomplete.'
|
||||
minimum: 0
|
||||
default: 1.0
|
||||
|
||||
DependencySchema = c.object {
|
||||
title: 'Component Dependency'
|
||||
|
|
|
@ -436,6 +436,7 @@ module.exports = class SpellView extends CocoView
|
|||
meta: $.i18n.t('keyboard_shortcuts.press_enter', defaultValue: 'press enter')
|
||||
name: doc.name
|
||||
tabTrigger: doc.snippets[e.language].tab
|
||||
importance: doc.autoCompletePriority ? 1.0
|
||||
haveFindNearestEnemy ||= doc.name is 'findNearestEnemy'
|
||||
haveFindNearest ||= doc.name is 'findNearest'
|
||||
if doc.name is 'attack'
|
||||
|
|
Loading…
Reference in a new issue