haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Add option to disable import popup notification

Open scarf005 opened this issue 3 years ago • 9 comments

Is your feature request related to a problem? Please describe.

Everytime I auto-import, a notification pops up. I have to remove it manually using ESC, and it's quite tedius.

Describe the solution you'd like

Add an extension option to disable import popup notification.

Describe alternatives you've considered tried to find an option to turn this off in extension settings but couldn't find any

Additional context

image notification in question

scarf005 avatar Sep 21 '22 07:09 scarf005

Hi, thank you for your bug-report! I think we need to move this issue to HLS main repo, as this message is sent from it... Unless we can filter it in the client somehow. Moving issue, s.t. we have more eyes on it.

fendor avatar Sep 21 '22 07:09 fendor

I'm a bit confused about where this is coming from? Any vscode users who can see from the logs what's causing this?

michaelpj avatar Sep 21 '22 14:09 michaelpj

Hm, maybe it is indeed a built-in feature from vscode?

fendor avatar Sep 21 '22 15:09 fendor

Presumably, it comes from here: https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs#L202

fendor avatar Sep 21 '22 16:09 fendor

Looks like it's been there for a long time, introduced here: https://github.com/haskell/haskell-language-server/pull/1371

Apparently I objected to it then, and I still do :D We could use AnnotatedTextEdits now, I think.

michaelpj avatar Sep 21 '22 16:09 michaelpj

Presumably AnnotatedTextEdits would make an HLS option to disable them unnecessary, since the client would be responsible for that right?

pepeiborra avatar Sep 21 '22 16:09 pepeiborra

I think so, but I haven't actually tested what they look like in clients.

michaelpj avatar Sep 22 '22 08:09 michaelpj

Semantically, it's the right thing from the spec's perspective, I think.

michaelpj avatar Sep 22 '22 08:09 michaelpj

I made an issue for using them more widely: https://github.com/haskell/haskell-language-server/issues/3210

michaelpj avatar Sep 22 '22 09:09 michaelpj