haskell / haskell/haskell-language-server

Inlay hint for package imports

Open
#4,485 0 comments 1 reaction 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 looking at an import, it's not obvious at a glance what package it comes from.

## Describe the solution you'd like

There is a syntactically valid way to show what packages imports come from: `PackageImports`! So we can have inlay hints where inserting the inlay hints gives valid Haskell, which is quite nice.

Something like this:
```
import "base" Data.List
```

## Describe alternatives you've considered

We already show packages and versions when hovering on imports, but this makes it even more immediate. It's probably going to be a bit of a love-it-or-hate it thing. And `PackageImports` is I think "discouraged" so maybe we shouldn't be encouraging people to use it.

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.