Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy doesn't respect comment indentation at the end of a block #102

Open
wclr opened this issue Jul 10, 2022 · 1 comment
Open

Tidy doesn't respect comment indentation at the end of a block #102

wclr opened this issue Jul 10, 2022 · 1 comment

Comments

@wclr
Copy link
Contributor

wclr commented Jul 10, 2022

In this example I would like to comment where clause (maybe to uncomment it later):

fn x = x*x
  -- where
  -- res = x*x

After formatting, such indented commented lines lose indentation:

fn x = x*x
-- where
-- res = x*x

If to uncomment on them there will be no indentation, this seems to be minor, though I think it should not happen.

@natefaubion
Copy link
Owner

That's because these are technically leading comments for the next declaration, or trailing module comments. Tidy would have to have some heuristic for preserving some whitespace in comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants