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

column_table_limit overrides column_limit and column_table_limit_kv #277

Open
kev-sheng opened this issue Feb 27, 2023 · 1 comment
Open

Comments

@kev-sheng
Copy link

kev-sheng commented Feb 27, 2023

The column_table_limit key is not working properly. Currently, it overrides all other column limit keys (such as column_limit and column_table_limit_kv).

Expected:

-- column_limit: 120
local string = "This is a string " .. "with many many " .. "many many characters " .. "which should not be formated."

-- column_table_limit: 10
local a =
    {
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one"
    }

-- column_table_limit_kv: 40
local some_list = {
    ['A'] = true,
    ['B'] = true,
    ['C'] = true,
    ['D'] = true,
    ['E'] = true
}

Actual:

-- column_limit: 120
local 
    string =
    "This is a string " ..
        "with many many " ..
        "many many characters " ..
        "which should not be formated."

-- column_table_limit: 10
local a =
    {
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one",
        "one"
    }

-- column_table_limit_kv: 40
local 
    some_list =
    {
        ['A'] = true,
        ['B'] = true,
        ['C'] = true,
        ['D'] = true,
        ['E'] = true
    }

Config file used:

column_limit: 120
column_table_limit_kv: 40
column_table_limit: 10

string has < 120 characters so it should stay in 1 line. Furthermore, some_list is put on to its own line which indicates a limit of 10 is applied.

EDIT: I'm using an extreme value for column_table_limit to clearly demonstrate that the de-facto global column limit is 10. What I would like is to be able to use these 3 keys independently of each other.

@Koihik

@bigahen
Copy link

bigahen commented Sep 15, 2023

I was experiencing this in the tagged version, but I think tip of master might have resolved it? I'm getting what I want at that point, anyway

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

2 participants