haskell / haskell/haskell-language-server

Better ordering for the list of actions for a "variable not in scope"

Open
#3,540 3 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

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

When giving a list of suggestions for a variable not in scope 98% of the time, the action I want to do is to add it to the imports of an already existing module. The problem is when the list of possible modules is very long the `add` suggestions are right down the bottom.

![image](https://user-images.githubusercontent.com/2076434/228774378-718b70d8-c144-4c32-a8f7-5d4c1779faa2.png)

![image](https://user-images.githubusercontent.com/2076434/228774451-418330ca-a1bc-409b-b67a-61ca65c7add7.png)

## Describe the solution you'd like

Sort the list of suggested actions to put the more likely ones at the top. In particular the `import` options (of which there may be zillions) should be below the `add` options.

## Describe alternatives you've considered

N/A

## Additional context

N/A

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.