Skip to content

format removes comments #767

Description

@isaacvando

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

postgres-language-server format removes all comments when formatting.

To Reproduce

See this example in my shell:

$ postgres-language-server version
CLI:        0.25.5
Server:     not connected
$ cat file.sql
-- one
select * from foo; -- two

/*
three
*/

create table bar (id int primary key); -- four
$ postgres-language-server format file.sql --write
Processed 1 file in 2ms. Fixed 1 file.
$ cat file.sql
select * from foo;

create table bar (id int primary key);%

Expected behavior

I'd expect the comments to be preserved through formatting.

Screenshots

N/A

System information

  • OS: MacOS

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions