Skip to content

column_table_limit overrides column_limit and column_table_limit_kv #277

@kev-sheng

Description

@kev-sheng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions