Simple question on persisting autocompletion on selection change

Hi!

This might not be an intended use of the library, but since I’m already familiar with Codemirror, I decided to use it for a simple search / command palette-esque selector. This was done by setting the tooltip() parent html so autocompletion items can be formatted as below.

The small thing I wanted to ask is if I can persist autocompletion when I press the left and right arrow keys or change selection via the mouse. The project is simple enough that I can probably just set a keymap and a click event listener to call the startCompletion command so it could appear like the completion didn’t stop, but just in case, is there a way to persist it instead of restarting?

Thank you!

palette

No. Moving the selection currently unconditionally resets the completions. Your use case might be different enough from typical autocompletion that it’s more straightforward to implement a custom extension than to try to shoehorn it into @codemirror/autocomplete’s model.

Got it, thank you for your response!