mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-02 00:43:34 -04: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
app
|
@ -91,6 +91,12 @@ PropertyDocumentationSchema = c.object {
|
||||||
{title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000}
|
{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'}
|
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 {
|
DependencySchema = c.object {
|
||||||
title: 'Component Dependency'
|
title: 'Component Dependency'
|
||||||
|
|
|
@ -436,6 +436,7 @@ module.exports = class SpellView extends CocoView
|
||||||
meta: $.i18n.t('keyboard_shortcuts.press_enter', defaultValue: 'press enter')
|
meta: $.i18n.t('keyboard_shortcuts.press_enter', defaultValue: 'press enter')
|
||||||
name: doc.name
|
name: doc.name
|
||||||
tabTrigger: doc.snippets[e.language].tab
|
tabTrigger: doc.snippets[e.language].tab
|
||||||
|
importance: doc.autoCompletePriority ? 1.0
|
||||||
haveFindNearestEnemy ||= doc.name is 'findNearestEnemy'
|
haveFindNearestEnemy ||= doc.name is 'findNearestEnemy'
|
||||||
haveFindNearest ||= doc.name is 'findNearest'
|
haveFindNearest ||= doc.name is 'findNearest'
|
||||||
if doc.name is 'attack'
|
if doc.name is 'attack'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue