Skip to content

Comment inside parenthesis go to newline #111

@lnc3l0t

Description

@lnc3l0t

If I have a table with multiple elements I cannot comment the first line without the comment going to newline:

local table = { -- My comment
    elem1 = {},
    elem2 = {}
}

local table = { --[[ My comment ]]
    elem1 = {},
    elem2 = {}
}

Becomes:

local table = {
-- My comment
    elem1 = {},
    elem2 = {}
}

local table = {
--[[ My comment ]]
    elem1 = {},
    elem2 = {}
}

In neovim the option foldmethod set to "marker" works badly because of this. Say my marker is -->--, it will go to newline and the fold will not have the text of the first line of the table as its description.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions