codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.94k stars 376 forks source link

[Feature Request] Completion offset. #1468

Closed Jah-On closed 1 week ago

Jah-On commented 1 week ago

Hello,

I am integrating CodeMirror into a math typesetting web app that uses AsciiMath. Some of the completions for AsciiMath have multiple bracket parts, such as frac{}{}, and based on what I've seen, controlling the caret offset requires a custom callback function to dispatch the autocomplete and caret offset. It'd be nice having an offset member within the Completion object that CodeMirror's default completion system can use.

Thank you.

marijnh commented 1 week ago

Does a snippet provide what you're looking for here?

Jah-On commented 1 week ago

Does a snippet provide what you're looking for here?

That may in fact work better for my application. I'll close the issue for now knowing I can reopen if need be. Thank you!