Microsoft/TypeScript

Sort jsdoc parameter suggestions by argument position

开放

#20,183 创建于 2017年11月21日

 (9 条评论) (0 个反应) (0 位负责人)TypeScript (13,395 个派生)batch import
Domain: LS: Completion ListsGood First IssueHelp WantedSuggestionVS Code Tracked

仓库指标

星标
 (108,860 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

From https://github.com/Microsoft/vscode/issues/35124

TypeScript Version: 2.7.0-dev.20171116

Code

For the code:

/**
 * @param |
 */
function foo(z, a) {}

Trigger completions at the | after @param

Expected behavior: z is returned first, followed by a. The sortText can be used for this

Actual behavior: a and z are returned with sort orders weights:

[Trace  - 11:33:07 PM] Sending request: completions (176). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/san/y.ts",
    "line": 2,
    "offset": 11,
    "includeExternalModuleExports": true
}
[Trace  - 11:33:07 PM] Response received: completions (176). Request took 2 ms. Success: true 
Result: [
    {
        "name": "a",
        "kind": "parameter",
        "kindModifiers": "",
        "sortText": "0"
    },
    {
        "name": "z",
        "kind": "parameter",
        "kindModifiers": "",
        "sortText": "0"
    }
]

贡献者指南