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

Indenting and new lines and other things I don't understand #204

Open
roygbyte opened this issue Nov 13, 2022 · 0 comments
Open

Indenting and new lines and other things I don't understand #204

roygbyte opened this issue Nov 13, 2022 · 0 comments

Comments

@roygbyte
Copy link

roygbyte commented Nov 13, 2022

Hello Earthlings! I am trying to have my Lua code formatted like this:

local subscription = FeedSubscription:new({
    id = subscription_results.subscription_id
})

But instead, I get this:

local subscription = FeedSubscription:new({
        id = subscription_results.subscription_id
})

The idea here being that after a {, and moving to a new line, it would be oh so great if the indents are not doubled up (or whatever is happening.)

Not being very proficient with EmacsLisp, I've nonetheless tried to hack my way through this package to try to achieve my desired indentation. I didn't get very far.

Does anyone know what bits of the code I should be looking at for achieving this outcome? My best guess is that it has something to do with this code:

lua-mode/lua-mode.el

Lines 1572 to 1576 in 3e783c9

(cons 'relative (if (nth 2 (match-data))
;; beginning of a block matched
lua-indent-level
;; end of a block matched
(- lua-indent-level))))))

But that's all I know!

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