How to invoke `autocomplete` immediately after a completion is selected?

This example is virtually identical to the panic/park/password example, except that there’s a console.log and there’s an apply with a space and a p after each label. I’d like to chain the autocompletes, so that typing p then selecting password would fill out password p and immediately open the autocomplete menu for the next p-word. However, as the console.log reveals, myCompletions is not called after a completion is selected. Is this possible to achieve?

any luck? trying to achieve almost same thing

Nope.

One workaround is to customize the completionKeymap to have enter run acceptCompletion then immediately run startCompletion. However startCompletion is always explicit, which (in my case) is not desirable.

Please LMK if you can think of a better solution :slight_smile:

1 Like

Does this patch look like the feature it implements would help you?

2 Likes

I cloned & built the repo, copied it to my project via pnpm patch, and can confirm that it solves my problem! Thanks!

I’ve tagged @codemirror/autocomplete 6.16.0

1 Like