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 of nested tables #91

Open
Tracked by #117
AndreasMatthias opened this issue Mar 2, 2023 · 0 comments
Open
Tracked by #117

Indentation of nested tables #91

AndreasMatthias opened this issue Mar 2, 2023 · 0 comments

Comments

@AndreasMatthias
Copy link

AndreasMatthias commented Mar 2, 2023

Here are three tables that are indented like this using default settings:

aaa = { 111, {
    222, {
    333, {
    444 } } } }

bbb = { 111,
    { 222,
        { 333,
            { 444 } } } }

ccc = {
    111, {
    222, {
    333, {
    444 } } } }

It's not so easy to recognize the structure of these tables, especially of aaa and ccc.

I would have expected something more like the following:

aaa = { 111, {
            222, {
                333, {
                    444 } } } }

bbb = { 111,
        { 222,
          { 333,
            { 444 } } } }

ccc = {
    111, {
        222, {
            333, {
                444 } } } }

The rules for this indentation are:

  1. If { appears at the end of a line, then indent the next line relative to the first element of the outer group.
  2. If { starts a new line, then { shall have the same indentation as the first element of the same group.
@CppCXY CppCXY mentioned this issue Mar 7, 2023
7 tasks
@CppCXY CppCXY mentioned this issue Mar 29, 2023
5 tasks
@CppCXY CppCXY mentioned this issue Jun 13, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants