Skip to content

feature request: provide sortText with completionItems #2291

Closed
@mjlbach

Description

@mjlbach

We received this issue on the neovim client: neovim/neovim#15414

One thing that was reported by @tomsmeding (regarding HLS) is that the results are pre-sorted by the server to include

  • case-insensitive matching
  • typo-fixing
  • intelligent result ordering so that most likely matches come first

According to the specification, if sortText is not supplied, the client should sort on the label. See here

 * A string that should be used when comparing this item
 * with other items. When `falsy` the label is used
 * as the sort text for this item.
sortText?: string;

If the results should not be sorted, sortText should be supplied to indicate the results should not be sorted as such, otherwise according to the spec we should sort on the label as we currently do which perturbs the HLS returned ordering.

I can look into providing a PR if welcome :) I don't any experience with the HLS codebase though

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions