confluentinc / confluentinc/vscode
The completion sort order from flink language server isn't reflected in UI
- 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:
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
Assessment
This issue has not been assessed yet.