json-emacs / json-mode

Major mode for editing JSON files with emacs
314 stars 66 forks source link

Indent automatically when using electric-pair-mode #50

Closed raxod502 closed 1 year ago

raxod502 commented 7 years ago

In js2-mode, with electric-pair-mode enabled, and point | positioned as follows:

{|}

I can press RET to get the following:

{
    |
}

Unfortunately, doing the same in json-mode only gives:

{
|}

I think this may have something to do with the syntax table (not) provided by json-mode, since both js2-mode and json-mode inherit from js-mode.

taku0 commented 1 year ago

It works now.