Hovers on keywords #1603
ydaveluy
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
What are your imports for HoverParams and Hover? VSCode is offering up to 8 suggestions for each one. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I wanted to implement hovers on keywords like in Xtext.
I found a very simple way to do it:
That's all !
Depending on how the grammar is written the command
this.getAstNodeHoverContent(cstNode.grammarSource)
does not always find the documentation. I would expect that a Keyword prefixed with a comment would be of type AstNodeWithComment all the time but no. I don't know if it is expected or a bug.This implementation assume that MyDsl grammar and langium grammars uses the same terminal rule for ML_COMMENT.
Maybe this functionality could be integrated by default in langium ?
Beta Was this translation helpful? Give feedback.
All reactions