Skip to content

[explicit-imports-plugin] sort imported symbols #4875

@juhp

Description

@juhp

Is your enhancement request related to a problem? Please describe.

It seems as of HLS 2.13 the hls-explicit-imports-plugin does not order the explicit imports for a module lexically.
(Not sure how they are getting ordered, perhaps just by usage order?)

eg It suggested:

import Data.List.Extra ( singleton, dropPrefix, nubSort, splitOn )

instead of

import Data.List.Extra (dropPrefix, nubSort, singleton, splitOn)

Describe the solution you'd like

It would be nice to sort the explicitly imported functions, etc

Additional context

I glanced at the code, but it was a bit above my head: perhaps I would need to understand text ranges etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions