We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfe1d3b commit 810ee36Copy full SHA for 810ee36
src/editor/sagas.ts
@@ -698,7 +698,15 @@ function* runJedi(): Generator {
698
}
699
700
if (pythonMessageDidComplete.matches(msg.data)) {
701
- const list = JSON.parse(msg.data.completionListJson);
+ const list: monaco.languages.CompletionItem[] = JSON.parse(
702
+ msg.data.completionListJson,
703
+ );
704
+
705
+ // maintain sort order from jedi
706
+ for (const [i, item] of list.entries()) {
707
+ item.sortText = String(i).padStart(5, '0');
708
+ }
709
710
console.debug(list);
711
complete.resolve({ suggestions: list });
712
console.debug(`${id}: resolved: ${msg.data.type}`);
0 commit comments