mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:30:04 +08:00
101 lines
4.7 KiB
Plaintext
101 lines
4.7 KiB
Plaintext
"{{{ycm
|
|
Execute (error menu):
|
|
let completed_item = {'menu': 'number'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual [], result
|
|
|
|
Execute (fn()):
|
|
let completed_item = {'menu': 'fn()'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['()'], result
|
|
|
|
Execute (fn(other: [?])):
|
|
let completed_item = {'menu': 'fn(other: [?])'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(other)'], result
|
|
|
|
Execute (fn(other?: string) -> string):
|
|
let completed_item = {'menu': 'fn(other?: string) -> string'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(other)'], result
|
|
|
|
Execute (fn(other: ?) -> string):
|
|
let completed_item = {'menu': 'fn(other: ?) -> string'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(other)'], result
|
|
|
|
|
|
Execute (fn(test: fn(elt: ?, i: number, array: Array) -> bool, context?: ?) -> bool):
|
|
let completed_item = {'menu': 'fn(test: fn(elt: ?, i: number, array: Array) -> bool, context?: ?) -> bool'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(test, context)'], result
|
|
|
|
Execute (fn(test: {elt: string, i: number, array: Array}, context?: ?) -> bool):
|
|
let completed_item = {'menu': 'fn(test: fn(elt: ?, i: number, array: Array) -> bool, context?: ?) -> bool'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(test, context)'], result
|
|
|
|
Execute (fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})):
|
|
let completed_item = {'menu': 'fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['({compressible, extensions, register, source, type})'], result
|
|
|
|
Execute (fn({compressible, extensions, register, source, type}: {compressible: bool, extensions: [?], register: ?, source: string, type: string})):
|
|
let completed_item = {'menu': 'fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['({compressible, extensions, register, source, type})'], result
|
|
|
|
Execute (add(, omni):
|
|
let completed_item = {'word': 'add(', 'menu': 'a, b', 'info': '', 'kind': 'f', 'abbr': ''}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['(a, b)'], result
|
|
"}}}
|
|
|
|
"{{{ deoplete
|
|
Execute (error menu):
|
|
let completed_item = {"info": "number"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual [], result
|
|
|
|
Execute (fn()):
|
|
let completed_item = {"info": "fn()\nfsaf"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["()"], result
|
|
|
|
Execute (fn(other: [?])):
|
|
let completed_item = {"info": "fn(other: [?]\n)->faf"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["(other)"], result
|
|
|
|
Execute (fn(other?: string) -> string):
|
|
let completed_item = {"info": "fn(other?: string\n) -> string"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["(other)"], result
|
|
|
|
Execute (fn(other: ?) -> string):
|
|
let completed_item = {"info": "fn(other: ?) -> string"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["(other)"], result
|
|
|
|
|
|
Execute (fn(test: fn(elt: ?, i: number, array: Array) -> bool, context?: ?) -> bool):
|
|
let completed_item = {"info": "fn(test: fn(elt: ?, i: number, array: Array) -> bool, \ncontext?: ?) -> bool"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["(test, context)"], result
|
|
|
|
Execute (fn(test: {elt: number, i: number, array: Array}, context?: ?) -> bool):
|
|
let completed_item = {"info": "fn(test: fn(elt: ?, i: number, array: Array) -> bool, \ncontext?: ?) -> bool"}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ["(test, context)"], result
|
|
|
|
Execute (fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})):
|
|
let completed_item = {'info': 'fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['({compressible, extensions, register, source, type})'], result
|
|
|
|
Execute (fn({compressible, extensions, register, source, type}: {compressible: bool, extensions: [?], register: ?, source: string, type: string})):
|
|
let completed_item = {'info': 'fn(options: {compressible: bool, extensions: [?], register: ?, source: string, type: string})'}
|
|
let result = cm_parser#javascript#parameters(completed_item)
|
|
AssertEqual ['({compressible, extensions, register, source, type})'], result
|
|
"}}}
|