kamadorueda / alejandra

The Uncompromising Nix Code Formatter
https://kamadorueda.github.io/alejandra/
The Unlicense
855 stars 41 forks source link

Keep short multi-line comments on one line #405

Closed matt1432 closed 10 months ago

matt1432 commented 10 months ago

I learned recently that syntax highlighting for multi-line string blocks works with treesitter and neovim, so I tried doing it like so:

{
  programs.bash.shellAliases.cp = /*bash*/ "cp -r";
}

And it worked perfectly

However, after formatting my code with alejandra, it always wants to make the comment multi-line which is very unnecessary for my use case:

{
  programs.bash.shellAliases.cp =
    /*
    bash
    */
    "cp -r";
}
bew commented 10 months ago

Duplicate of #366