haskell / haskell/haskell-mode

haskell-mode-format-imports does not sort all import groups

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

Description

Perhaps this is by design. I would like to modify this function so that it 1) sorts all import groups 2) does not require having the point on an import.

E.g. given the following module, the current behavior aligns all import groups, but only sorts the group at point. Nothing is done when the point is on the 'baz' definition.
```haskell
import Foo.Types
import qualified Foo.Bar as B

import System.IO
import qualified Data.Text as T

baz = 1
```

Contributor guide

Open the contributing guide

Research direction

Locate haskell-mode-format-imports and reproduce the example with the point both on an import and on the baz definition. The change is complete when every import group is sorted and the command works without requiring the point to be on an import.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp, haskell
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.