Codemirror.next and auto completion

Hi there!

I started using Codemirror 6 and it looks very promising. Congratulations for the work! The HTML autocompletion/suggestion works quite well with opening tags. However, it looks like the UX could be improved. I mean by inserting at least closing tags associated with the opening tags.

For instance, when you write <sty, style is suggested. Upon selection, you get <style. What I suggest is to have a mean to get <style></style> and the cursor moves between the opening and closing tags.

More generally, a behavior similar to IntelliJ Idea autocompletion would be fantastic but I have no idea about the work it requires. Taking their IDE as an example, they can auto-close tags, move the cursor to appropriate attributes and body in sequence and this with any language. For instance, autocompleting func in JS produces a full function definition function f() { }, automatically selects f for changing the name and upon name validation moves the cursor between ( and ) to edit parameters.

Since codemirror 6 is still in its early days and it seems that some design decisions are in progress, I was wondering if there is any plan to support such feature(s) in the core library?

I have considered including snippet-style functionality by default in the autocomplete package — it already allows overriding completion behavior for a given completion, so you can wire in almost anything, but this is probably useful enough to be part of the package itself. Not sure when I’ll get around to that, but if you want to help, please open an issue and we’ll discuss the approach to take there.