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

Expansion without file snippet #32

Open
akemrir opened this issue Mar 20, 2023 · 2 comments
Open

Expansion without file snippet #32

akemrir opened this issue Mar 20, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@akemrir
Copy link

akemrir commented Mar 20, 2023

Hi is it possible to expand without file snippet?

When I would have separate source of completion, omnicomplete for example:

Scenario: Breaker guesses a word
  Given the Maker has chosen a word
  When the Breaker makes a guess
  When the <{}> makes a guess (c)
  Then the Maker is asked to score

(c) - where cursor is placed after line insert.

I want to jump to placeholder and fill it in as in snippet from file.

@akemrir akemrir changed the title Expansion Expansion without file snippet Mar 20, 2023
@Jorenar
Copy link
Owner

Jorenar commented Mar 21, 2023

At the moment, it's not possible, I'm afraid.
I was experimenting with something like that, but deemed it not worth the effort at the time.

On the other hand, it's not impossible. It's a matter of creating s:SNIP dictionary (with s:Snip() function), then adding s:SNIP.patterns with s:updatePattern(), then filling s:SNIP.pos (which normally would happen in s:insertSnippet()) and handling this case in miniSnip#trigger(). I think I would welcome a PR for that.

@Jorenar Jorenar added enhancement New feature or request help wanted Extra attention is needed labels Mar 21, 2023
@akemrir
Copy link
Author

akemrir commented Mar 25, 2023

ok, will do the POC when I got time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants