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

Indentation. #56

Closed
yxhuvud opened this issue May 13, 2013 · 8 comments
Closed

Indentation. #56

yxhuvud opened this issue May 13, 2013 · 8 comments

Comments

@yxhuvud
Copy link

yxhuvud commented May 13, 2013

lua-mode seems to default to indent 3 spaces.

Reading http://lua-users.org/wiki/LuaStyleGuide , it seems 2 is the most common number to indent, and that would therefore be a better default.

@agladysh
Copy link

+1

@immerrr
Copy link
Owner

immerrr commented May 14, 2013

I agree that it would've been a better default value for lua-mode rewrite. But I'm reluctant to change it right now, because it has been like that for ages and I expect the following to happen after the change:

  • if a user was happy with the default, she might get frustrated about lua-mode starting to indent code differently and about the necessity to touch configuration files to restore the way things were
  • if a user was not happy with the default, chances are that lua-indent-level is already customized and the change will go completely unnoticed

So, atm, it seems somewhat pointless, or do I miss something?

@agladysh
Copy link

Sorry for a lazy question, but: is lua-indent-level documented and visible
to user?

@immerrr
Copy link
Owner

immerrr commented May 14, 2013

If you mean "it's mentioned in lua-mode doc", then no, since there's no such doc :) But you sure can access it & read its docstring via M-x customize-group lua

@agladysh
Copy link

Ohh, well, I'll assume that finding that info is a common Emacs
knowledge, and I'm just an Emacs-illiterate (which I am).

@immerrr
Copy link
Owner

immerrr commented May 15, 2013

I've just checked: it does require a bit of intuition or a knowledge how to use search box in "M-x customize" to find it. It is worth an extra mention in the readme (or commentary).

@impaktor
Copy link

impaktor commented Jan 1, 2014

I think this could be closed, if one adds to the README:

;; change default indentation
(setq lua-indent-level 4)

@immerrr
Copy link
Owner

immerrr commented Jan 4, 2014

I've added a quick summary of most useful customization variables (including lua-indent-level) to README.md.

@immerrr immerrr closed this as completed Jan 4, 2014
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

4 participants