Give some API properties priority in autocomplete.

This commit is contained in:
Rob 2015-10-27 23:23:43 -04:00
parent 6e1cb8a1d1
commit da92e15bfb
2 changed files with 7 additions and 0 deletions

View file

@ -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'

View file

@ -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'