oakmac / atom-parinfer

Parinfer for Atom
ISC License
204 stars 8 forks source link

Parinfer tabs defeat snippet tabstops #75

Open mtnygard opened 7 years ago

mtnygard commented 7 years ago

Snippets can have one or more tabstops embedded in them with '$1', '$2', etc. After expanding a snippet, tab is meant to cycle between these locations.

With parinfer enabled (at least in Indent mode, not sure about Paren mode) this tab cycling is overridden by parinfer inserting a literal tab.

shaunlebron commented 7 years ago

Thanks for reporting. I actually couldn't reproduce this. But we are about to add smart tab stops, and it's good to know that we have to avoid creating this problem in the future.

In a cljs file I typed defn followed by Tab:

atom-parinfer-snippet

so I'm not sure what the problem could be, but this is our keymap, which shows we're not overriding tab key yet: https://github.com/oakmac/atom-parinfer/blob/master/keymaps/atom-parinfer.json

nilshae commented 7 years ago

I just noticed this issue. Here is what it looks like for me, when I type defn followed by Tab

kapture atom-parinfer issue 75

I also checked the Key Binding Resolver and can confirm that the snippets:next-tab-stop command is overridden by the parinfer:next-tab-stop command.

shaunlebron commented 7 years ago

@nilshae thanks for reporting! I was able to recreate the bug.

Cmd + . showed the keybinding resolver that confirmed the priority:

screen shot 2017-08-23 at 10 15 55 am

Wasn't able to find a quick solution: