David-Kunz / gen.nvim

Neovim plugin to generate text using LLMs with customizable prompts
The Unlicense
992 stars 64 forks source link

Sort prompt keys for the prompt select menu #10

Closed leafo closed 9 months ago

leafo commented 9 months ago

This will ensure that the select menu options have the same ordering every time the menu appears, since currently they are defined in a hash table and Lua provides no consistent ordering of items iterated via pairs. The default vim select menu utilizes numeric selection of options, so having consistent ordering is beneficial

David-Kunz commented 9 months ago

Hey @leafo ,

Thank you for this PR, definitely makes sense!

Best regards, David