confluentinc / confluentinc/vscode

The completion sort order from flink language server isn't reflected in UI

Open
#2,156 0 comments 0 reactions 1 assignee Claimed by @noeldevelops View on GitHub
Flink
Dominant language
TypeScript
Stars
34
Forks
17
Avg merge
1d 22h
Merged PRs (30d)
8

Description

The FlinkSQL language server sends items in a specific order so that the item type is considered, but vscode is using its own internal logic to re-order items. This appears to be because the server doesn't send `sortText` with the items, and client-side sorting is expected behavior for the language client based on [the spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion:~:text=for%20this%20item.%0A%09%20*/-,sortText%3F%3A%20string%3B,-/**%0A%09%20*%20A%20string%20that).

**To mitigate we can try to add our own sort order (a number or index maybe?) that matches the server's order.**

e.g. in the list below we expect column names to come first:
Image

Related LSP and VSCode issues that touch on this:
https://github.com/microsoft/vscode/issues/79516
https://github.com/microsoft/language-server-protocol/issues/898

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.