haskell / haskell/haskell-mode

Implement comment handling for haskell-indentation-mode

Open
#1,034 0 comments 0 reactions 0 assignees View on GitHub
indentation
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

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'.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.