Skip to content

Allow for a leading newline for files with header comments #1125

Description

@gaymeowing

Currently if I make a file with a header comment stylua will trim the leading newline before the header comment, making the header comment not look as nice:

Before:

-- create signal
-- generic signal module

local signal = {}

return signal

After:

-- create signal
-- generic signal module

local signal = {}

return signal

It'd be nice if stylua could detect header comments that start with the file name, with it being case-insensitive and allowing spaces in place of - or _ in the file name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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