Feature idea: 'fuzzy' function doc search

14 views
Skip to first unread message

Timmo Verlaan

unread,
Feb 2, 2020, 1:22:47 PM2/2/20
to elixir-lang-core
Hi,

The idea is quite simple and mostly aimed at beginners to Elixir. Currently on the hexdocs website there is a search box at the top left of a package (Elixir is seen as package as well). By typing in this searchbox it applies a simple filter on available functions and it allows you to choose one from it. This is easy if you know you need a certain function, it's probably called a certain way, but you're not sure about the module, or you're not sure about the full name of the function.

The idea is to create the exact same functionality in iex. This gives the benefit of not having to leave the iex session while still having the ability to search through your functions and their respective documentation. I've made a sample project to get an idea of what it could look like. The scoring algorithm probably needs some additional tweaking and currently it still reports functions that don't even have docs or which are not really advertised as 'public'. This would be up for debate and it could be that there is an API that would make this implementation more robust that I didn't know off. The project can be found here: https://github.com/tverlaan/fuzzy_doc_search

Please let me know what you think and lets see how/if we can improve iex with this idea.

Kind regards,
Timmo Verlaan
Reply all
Reply to author
Forward
0 new messages