Skip to content

Comment deleted unexpectedly on format #1033

@sharpchen

Description

@sharpchen

Comment was deleted on formatting an array

Example

before
_ = {
  ("foo"),
  ("foo"),
  -- ("foo")
  -- ("foo")
  -- ("foo")
  ("foo"),
  ("foo")
}

Format with command(as is the default in https://github.com/stevearc/conform.nvim/blob/HEAD/lua/conform/formatters/stylua.lua#L9-L9)

.stylua.toml
indent_type = 'Spaces'
indent_width = 2
quote_style = 'AutoPreferSingle'
column_width = 90
collapse_simple_statement = 'Always'
call_parentheses = 'NoSingleTable'
stylua --search-parent-directories --respect-ignores --stdin-filepath $FILENAME -
after
_ = {
  'foo',
  'foo',
  'foo',
  'foo',
}

Version

2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions