Skip to content

Implement comment handling for haskell-indentation-mode #1034

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

Open
gracjan opened this issue Dec 24, 2015 · 0 comments
Open

Implement comment handling for haskell-indentation-mode #1034

gracjan opened this issue Dec 24, 2015 · 0 comments

Comments

@gracjan
Copy link
Contributor

gracjan commented Dec 24, 2015

Comments are a bit special when it goes with indentation. Usually we want to align comments to a similar comment in previous line, failing that we want to align to tokens in previous line. But we cannot treat comments just like token because it would break valid code, so we need to align tokens to tokens only.

For example:

main = do
  code 1
       -- comment 1
       -- comment 2
  code 2

Above we want comment 2 to align to comment 1, but code 2 to align to code 1.

As far as I understand this can be achieved by marking some eligible positions as 'comment only eligigle'.

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

No branches or pull requests

1 participant