Skip to content

Import list whitespace is inconsistent #2399

Closed
@JakobBruenker

Description

@JakobBruenker

Your environment

Output of `haskell-language-server --probe-tools``:

haskell-language-server version: 1.5.0.0 (GHC: 9.0.1) (PATH: C:\Users\user\AppData\Roaming\C
ode\User\globalStorage\haskell.haskell\haskell-language-server-1.5.0-win32-9.0.1.exe) (GIT h
ash: 311107eabbf0537e0c192b2c377d282505b4eff1)
Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          Not found
ghc:            9.0.1

Which OS do you use: Windows
Which lsp-client do you use: VS Code

Steps to reproduce

Open a new Haskell file. Write

import Control.Monad

f = guard catMaybes

where auto-completion should be used to complete catMaybes.

HLS will insert a import statement at the top saying import Data.Maybe (catMaybes).

In VS Code, you can click above import Control.Monad to add an import list. This will result in import Control.Monad ( guard ).

Expected behaviour

The spaces inside the parentheses in the import lists should be consistent.

Actual behaviour

The two methods to automatically obtain an import list differ in whether or not there are spaces inside the parentheses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HackathonThis issue is suitable for hackathon sessionscomponent: imports pluginlevel: easyThe issue is suited for beginnerstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions