lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.94k stars 397 forks source link

Feature: Fuzzy search with lunr.js #1287

Closed itay-grudev closed 1 month ago

itay-grudev commented 4 years ago

I'd like to propose the following improvement:

Making the search support fuzzy matches using an engine like Lunr.js

This way if I misspelled a class or method name it would still show up.

Earlier today I was looking for a wrong class name (I added an extra s to Location) and was getting API modules instead of the Location module. It would have been really useful if it had matched both results.

lsegal commented 4 years ago

I would recommend building a plugin to do this via template customization (template architecture docs) as a first step. The plugin could initially just be included into projects on a per-use basis and we can revisit its inclusion into YARD core if it works really well.