I am writing a custom VSCode Extension that helps me add relative (from the workspace) links to files in my project; I have two use cases:
1) search for files by keyword (searches anywhere in the workspace) 2) list files by folder
Since "list files by folder" is more specific, and thus more likely to contain the desired, I want them to show up first in the CompletionItem suggestions.
So when I search for "pictures", i get a list of CompletionItems
../../../../animals/pictures/cat.png (by keyword)
../../../../animals/pictures/dog.png (by keyword)
../../../pets/pictures/dog.png (by keyword)
./pictures/dog.png (by files in folder)
I can add the CompletionItems to the return array in any order I like, and it still lists alphabetically.
Is there any way I can control the order the results list?