flatironinstitute / stan-playground

Run Stan models in the browser
Apache License 2.0
36 stars 1 forks source link

implement error/warning squiggles in stan editor #100

Closed magland closed 5 months ago

magland commented 5 months ago

Fixes #76

WardBrian commented 5 months ago

I think it makes sense to do some munging on the error messages so they look nicer on the hover-over, e.g. removing the 'preview' stanc gives you. See:

https://github.com/WardBrian/vscode-stan-extension/blob/main/src/linter.ts#L38 https://github.com/WardBrian/vscode-stan-extension/blob/main/src/linter.ts#L48

Additionally, with this implemented, do we still see value in the "pop-up" error window?

magland commented 5 months ago

Additionally, with this implemented, do we still see value in the "pop-up" error window?

Not sure about that. But can we keep it in there for the time being? Not ready to say goodbye :)

WardBrian commented 5 months ago

Sure, no need to delete it in the same PR -- just speculating for the future!

magland commented 5 months ago

I think it makes sense to do some munging on the error messages so they look nicer on the hover-over, e.g. removing the 'preview' stanc gives you. See:

https://github.com/WardBrian/vscode-stan-extension/blob/main/src/linter.ts#L38 https://github.com/WardBrian/vscode-stan-extension/blob/main/src/linter.ts#L48

I was about to use that code, but saw that it's GPL. Do I have your permission?

WardBrian commented 5 months ago

Ah, yes. The project I forked from is GPL, but I am the sole author of that file, and I happily grant permission.

magland commented 5 months ago

Okay, the messages are now reformatted and they look nice!

Another comment about the syntax window... I think it's nice to not just rely on seeing a slight yellow squiggle... so even if we do remove that window, we'll want to be able to display something prominently that there are issues (and at that point, I'd like to click on that notification and get the details)