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

Feature request: Allow using the same key for select & snippet forward/backward #131

Closed
3rd opened this issue Oct 17, 2024 · 1 comment
Closed

Comments

@3rd
Copy link

3rd commented Oct 17, 2024

Hey, I'd like to request a feature 🙏

Could there be a flag or some way to enable a behavior preventing the completion from triggering while a snippet is active?

I'd like to use the same key binds (Tab/S-Tab) to select an item when the completion is triggered and to navigate to the previous/next snippet fragment location:

        keymap = {
          select_next = { "<Down>", "<C-n>", "<Tab>" },
          select_prev = { "<Up>", "<C-p>", "<S-Tab>" },
          snippet_forward = "<Tab>",
          snippet_backward = "<S-Tab>",
        },

Something like:

@on_trigger_key press
if (!snippetActive) trigger()

How could I achieve this? Thank you!

@Saghen Saghen closed this as completed in 49b033a Oct 18, 2024
@3rd
Copy link
Author

3rd commented Oct 18, 2024

This is awesome, thank you so much!

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

1 participant