How to do auto close arc on codemirror?

I need to do auto close arc when I type ‘(’ … I.e when I type ‘(’ then I want to codemirror auto type ')'
and I need auto type for ‘{’ ‘}’ too … any help ?

This one

ok , it work thank you @marijn