m4xshen/autoclose.nvim

Strange indentation upon newline (enter)

wookayin opened this issue · 3 comments

{|<Enter>}

becomes:

{ 
        |
    }

whereas expected behavior is:

{
    |
}

GIF:

CleanShot 2022-12-25 at 18 55 06

Please set smartindent to off.

Hmm, why smartindent has to be off?

With nosmartindent, the outcome after keystrokes ( <CR> or { <CR> would be:

(
|
)
{
|
}

whereas

{
    |
}

is an expected behavior that I would like to have with some config options.

Did you try this in the programming file, such as .lua ? Because in the text file no indent is the default action.