Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parinfer tabs defeat snippet tabstops #75

Open
mtnygard opened this issue Feb 17, 2017 · 3 comments
Open

Parinfer tabs defeat snippet tabstops #75

mtnygard opened this issue Feb 17, 2017 · 3 comments

Comments

@mtnygard
Copy link

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
Copy link
Collaborator

shaunlebron commented Jul 31, 2017

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
Copy link

nilshae commented Aug 23, 2017

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
Copy link
Collaborator

@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:

  • parinfer keymaps take priority over snippets keymaps because _____ ? (can't find this documented or discussed anywhere)
  • snippets does not provide an inspectable state for knowing if a snippet is being expanded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants