Indent on paste

The general approach for this would be to have a transaction filter that detects pastes (tr.isUserEvent("input.paste")) and adds changes that reindent the affected regions (see indentRange in @codemirror/language 6.2.0) for them.

1 Like