Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unindenting 'end' without hitting RET #190

Open
lijaesela opened this issue Apr 12, 2021 · 2 comments
Open

unindenting 'end' without hitting RET #190

lijaesela opened this issue Apr 12, 2021 · 2 comments

Comments

@lijaesela
Copy link

for k,v in ipairs(arg) do
    stuff()
    end

I noticed that 'end' is only unindented after RET is hit. As such, the situation above happens to me a lot.
This is somewhat bothersome, especially in evil-mode, where I very often will not return after finishing a block like this.

@immerrr
Copy link
Owner

immerrr commented Apr 13, 2021

This is implemented in lua-mode via electric-indent-mode, which has electric-indent-chars configuration variable which is a list that by default has only ?\n (newline). lua-mode adds some characters after which it is almost certain that a line's indentation is going to change (}, ], )).

Do you have some specific characters in mind that would help in your use case?

@iajrz
Copy link

iajrz commented Apr 18, 2021

I found this, which might help: https://github.com/Malabarba/aggressive-indent-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants