vscode-haskell icon indicating copy to clipboard operation
vscode-haskell copied to clipboard

Support for errors.haskell.org?

Open danwdart opened this issue 2 years ago • 5 comments

Describe the solution you'd like

I'm not sure if it's out of scope, but would it be a good idea to have this extension support errors.haskell.org?

I could ctrl-click on an error code and it would show me a little window to explain what the error means, and allow me to go further and open it in a new tab or browser window if I wanted.

Describe alternatives you've considered

It could be a different repo if it's completely out of scope. I've not made these plugins before.

danwdart avatar May 31 '23 14:05 danwdart

Hi!

I think that's a good idea. Do you have any specific errors in mind, or some interaction?

fendor avatar May 31 '23 14:05 fendor

I mean that if you hover an error code and click, it could look that error code up in a side pane, full tab or as if it's a link by prepending https://errors.haskell.org/messages/ to it. I think they're all doable, with a bit of lookup logic.

I suppose a setting would be used to specify the action of clicking the error, I think a side pane would be a good setting to default to.

So e.g. you get GHC-09009 in a terminal, hover and click and you get a side pane with the information from https://errors.haskell.org/messages/GHC-09009/ inside it.

danwdart avatar May 31 '23 14:05 danwdart

IMO, this requires:

  1. ghc9.6+
  2. Update lsp to support code description

July541 avatar Jun 05 '23 13:06 July541

Yeah, the suggestions are not necessarily in the scope of vscode-haskell. However, I am confident, there are use-cases for us, too... Better error communication, one where we have control over the rendering, sounds very promising to me.

fendor avatar Jun 05 '23 17:06 fendor

VSCode haskell does some of its own shenanigans like downloading and parsing https://github.com/haskell/ghcup-metadata/blob/develop/hls-metadata-0.0.1.json

This isn't done by GHCup, so may be useful to have its own error scope.

hasufell avatar Jun 06 '23 03:06 hasufell