edubkendo / atom-racer

Intelligent code completion for Rust in the Atom Editor. Requires Racer.
MIT License
115 stars 24 forks source link

Add autocomplete-plus snippets for functions #42

Closed kylewlacy closed 8 years ago

kylewlacy commented 9 years ago

Snippets!

edubkendo commented 9 years ago

@alkama have you seen this one yet?

alkama commented 8 years ago

Sorry, was in holiday.

Gotta admit i'm also back to vim and havent been using atom for ages (looks like forgetting about a first love is pretty much impossible) :)

Wont probably be able to contribute or review much anymore.

HybridEidolon commented 8 years ago

Could you add a configuration option to put it in the description field instead of the name? So that it doesn't resize the dialog so much.

kylewlacy commented 8 years ago

@Furyhunter From what I understand, the autocomplete dialog shouldn't be resizing (an overflowing name should be truncated with '...'). See the screenshots from this PR in the autocomplete-plus repo for what a completion should look like.

That said, I'm also not the repo owner, so it's ultimately not my say. However, using the description to show the full name and type info would conflict with using the description to show a function's docstring (which is what the autocomplete-plus wiki recommends, and is something I'd like to see in a future version of the racer plugin).

EDIT: Actually, I see what you mean now about the suggestions window resizing. How would you rather the suggestion be shown, if not for the full function signature? Just the function name?

HybridEidolon commented 8 years ago

I suppose if there's not another recommended way of doing it, then showing the function declaration is the best way. Maybe when racer gets type inferencing support, the same can be done for variable bindings, statics and consts.

edubkendo commented 8 years ago

@kylewlacy this looks really good. I kind of like seeing the function signatures, but I don't know how annoying the window resizing stuff is...

cburgdorf commented 8 years ago

I'd vote for merging this as is :+1:

edubkendo commented 8 years ago

Yeah, I'll merge and if there are any problems someone can address them in another PR.

edubkendo commented 8 years ago

Merged and published. Thanks for all your work guys!

cburgdorf commented 8 years ago

:+1:

armink commented 8 years ago

:+1: