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

Functions declared after operators are indented in an odd way #33

Open
AgentOttsel opened this issue Oct 15, 2018 · 0 comments
Open

Functions declared after operators are indented in an odd way #33

AgentOttsel opened this issue Oct 15, 2018 · 0 comments

Comments

@AgentOttsel
Copy link

When I declare a function after an operator, like this:

local action = params.action or function()
    doStuff()
end

...lua-fmt formats it like this:

local action = params.action or function()
        doStuff()
    end

It seems like the more operators I add, the weirder the indentation gets. For example:
Before:

local action = params.action or 1 and 1 and 2 or 5 and 10 and 2 + function()
    doStuff()
end

After:

local action = params.action or 1 and 1 and 2 or 5 and 10 and 2 + function()
                doStuff()
            end
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

1 participant