wende / autocomplete-elixir

Intelligent Elixir autocompletion provider for Atom autocomplete-plus
MIT License
42 stars 11 forks source link

`Esc` key is not trapped when suggestions are shown. #55

Open ghost opened 8 years ago

ghost commented 8 years ago

I am using your package with Atom, and I also use the vim-mode package. Pressing Esc when aborting the autocomplete also takes me out of Insert mode in vim. Is there a way for your package to trap the Esc key so that the vim-mode doesn't receive it?

I have done a little research into it, and actually there is a pretty recent Stack Overflow question for the same type of scenario.

In the spirit of contributing, I've tried looking into your code, but there is just too much of the structure that I don't understand. That SO answer mentions a custom css for a custom view, but I can't seem to find how your package creates the popup suggestion view. It looks like alchemide is the "heart" of the brains of figuring out the autocomplete suggestions, and I can follow how the provider talks to the client. I just can't see what is the thing that is popping up the window. Even granting that we could do what the SO unmarked answer suggests, I'm not sure if doing the keybinding would actually trap the Esc key.

Perhaps you could give me (and the rest of the interweb) a super duper quick breakdown of the major pieces, e.g. delorean, provider, client, etc.? And it should go without saying, thanks for the awesomeness of the package in the first place. :+1: