eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
754 stars 68 forks source link

JSDoc hover disapper after upgrading langium from 1.0.1 #1052

Closed jiashengguo closed 1 year ago

jiashengguo commented 1 year ago

Langium version:1.2.0 Package name: langium

Steps To Reproduce

image

It used to have the JsDoc hover hint by default when using langium 1.0.1. After upgrading to 1.1.0, it's gone. It is still not there even after upgrading to 1.2.0.

Is there any place we need to manually turn on it now?

msujew commented 1 year ago

I cannot reproduce this issue on 1.2.0:

image

Can you give some better reproduction steps for this issue?

jiashengguo commented 1 year ago

@msujew, after taking a deep look, I found that JSdoc comments require two stars in the beginning line, whereas in our code we only use one star, which I don't know why it was working in langium 1.0.1.

Anyway, thanks for the efforts on it, and sorry for the trouble, I will update our code instead.

msujew commented 1 year ago

Right, the old version didn't follow JSDoc at all. It basically just stripped the /*, * and */ symbols and displayed everything in between in the hover. The new JSDoc parser actually follows the spec and therefore requires /** at the start. You can change that if you like though. You just need to override the DocumentationProvider.