haskell / haskell/haskell-language-server

Top-level completions could be better

Open
#4,905 2 comments 3 reactions 1 assignee Claimed by @crtschin View on GitHub
component: ghcide type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

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

When the cursor is on the top-level, and I issue a completion request. Almost all of the results in the dropdown don't make sense. From what I can tell, the completions include symbols that are available within expressions, which aren't valid on the top-level.

Image

## Describe the solution you'd like

For the top-level completions, I think it'd be best to only have snippets related to declarations. So showing snippets for:

- ~~Pragmas~~
- Imports
- Functions
- Typeclasses
- Instances
- Types

If one of these snippets is picked and the user is filling in the placeholders, the regular completions can kick in again.

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.