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

feat(api): at_edge may now be a user-defined function #87

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

mrjones2014
Copy link
Owner

Fixes #85

@mrjones2014
Copy link
Owner Author

@IndianBoy42 Does this work for you?

@IndianBoy42
Copy link

IndianBoy42 commented Apr 19, 2023

      at_edge = function(ctx)
        if ctx.direction == "left" then
          vim.cmd.NvimTreeFocus()
        elseif ctx.direction == "right" then
          vim.cmd.Trouble()
        else
          ctx.split()
        end
      end,

This seems to work great! thanks again

I did notice that the context object doesn't have a wrap() helper, a user might want to fallback to wrapping unlike me right?

@mrjones2014
Copy link
Owner Author

Good call. Added.

@mrjones2014 mrjones2014 merged commit e27791a into master Apr 19, 2023
@mrjones2014 mrjones2014 deleted the mrj/85/user-defined-at-edge branch April 19, 2023 16:12
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

Successfully merging this pull request may close these issues.

[Feature]: Custom at_edge behaviour (user-defined function)
2 participants