microsoft / vscode-arduino

Visual Studio Code extension for Arduino

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sort Library Manager list alphabetically

2bam opened this issue · comments

I'm trying to find the "MQTT" library on the Library Manager list.

But I have 109 libraries matching.

With the list being unsorted it makes it really hard to locate the one with exact name "MQTT".
Other short named libraries have this problem, like LittleFS.

"MQTT" of course matches a lot of libraries, but that's the exact name of the library I want to add.
I cannot even text search (Menu: Edit->Find) on the custom webview.

It's probably a one line fix that will spare me from (worst case) going over half a hundred items.

Thanks

If right after this

const filteredLibraries = this.props.libraries.filter((element) => {

you add

filteredLibraries.sort((a,b)=>a.name.localeCompare(b.name));

That would be it!

Same for boards:

Here

Add

filteredPlatforms.sort((a,b)=>a.name.localeCompare(b.name));