atom-elmjutsu icon indicating copy to clipboard operation
atom-elmjutsu copied to clipboard

fancy search

Open feldman4 opened this issue 8 years ago • 6 comments

It would be great to have something like http://klaftertief.github.io/elm-search/ available for the current project and dependencies.

feldman4 avatar Jan 09 '17 06:01 feldman4

Looks cool! What are your use cases for this?

halohalospecial avatar Jan 09 '17 14:01 halohalospecial

I'm waist-deep fixing a pipeline with the stellar atom-elmjutsu plugin and I can't quite remember the name of my own function : OneType -> ToAnother.

For library functions I just go to the website.

feldman4 avatar Jan 10 '17 07:01 feldman4

Maybe we can replace Go To Symbol with this. We can search for either the symbol name or the type.

(Just imagine types and other info are also displayed.) go-to-symbol

I hope we can reuse code from https://github.com/klaftertief/elm-search :smile: cc: @klaftertief

Also for reference: https://wiki.haskell.org/Hoogle Check out the "1.1 Searches" section.

halohalospecial avatar Jan 10 '17 07:01 halohalospecial

Thanks for pinging me. The elm-search is written in Elm and client-side only at the moment. It searches only published packages, though it can search local modules as well, given there is a proper index. The index is a combined list of documentation.json files. The search might not do everything you need at the moment, e.g. one can not prefix a function with a module name or search in types or type aliases. But this is quite easy to add... I have some plans to add some kind of server side search and to publish a standalone type-distance package that could be useful for editor integrations. I'm on parental leave a the moment, so my focus is a little bit shifted at the moment :-) So please keep me updated should you think about integrating some code as not all my pans and new code is published. I'll try to organise things then...

klaftertief avatar Jan 10 '17 14:01 klaftertief

@klaftertief Thank you for replying! Maybe it's best to wait on your progress. +1 on both the standalone Elm package and server side search! No need to hurry :smile:

halohalospecial avatar Jan 11 '17 04:01 halohalospecial

@feldman4, you might find this useful:

autocomplete-type-filtering

(Not as sophisticated as elm-search though because it's just using regex on the type signature :smile_cat:)

halohalospecial avatar Mar 17 '17 10:03 halohalospecial