Skip to content

Cannot apply hlint hints when a trailing comment is on the same line. #2290

Closed
@shapr

Description

@shapr

Your environment

haskell-language-server 1.4
Which OS do you use: NixOS
Which lsp-client do you use: haskell-lsp in emacs
Describe your project (alternative: link to the project): https://github.com/shapr/hlsexamples/blob/main/src/Examples.hs#L14

Steps to reproduce

Insert the line biggest items = foldr1 max items -- the line above will show two hlint hints, "eta reduce" and "use maximum" into a file, and attempt to apply any of the hlint hints.
If you move the comment to a different line, the hlint hints apply with no problems.

Expected behaviour

The hints should be applied.

Actual behaviour

The hints are not applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-hlint-plugintype: 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