avh4 / avh4/elm-format

Support for section in tags

Open
#407 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

In typical elm apps, we have a large union type for global messages.
So we need grouping these messages using comments.
But elm-format doesn't seem to recognize this kind of commenting style.

What do you think about this?

## Union Type Declarations

Expected:

```elm
type Msg =
= Msg1
| Msg2

-- This comment introduces a section in the tags
| Msg3
| Msg4
````

Actual:

```elm
type Msg =
= Msg1
| Msg2

-- This comment introduces a section in the tags
| Msg3
| Msg4
````

*Edited: as @basile-henry pointed out, above example contains extra `=` signs. Just a mistake.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Union Type Declarations example with elm-format and compare the Expected and Actual snippets. Trace how comments between union-type tags are handled, then verify that the section comment remains aligned as shown in Expected without changing other formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm, haskell
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.