-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[typespec-vs] Fix missing doc on hover in vs #6012
base: main
Are you sure you want to change the base?
[typespec-vs] Fix missing doc on hover in vs #6012
Conversation
All changed packages have been documented.
|
You can try these changes here
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add screenshot for VS in the description comparing the before and after, from the change I don't really understand how that would make it different.
This also makes it worse in VScode and if we have to choose between VSCode experience or Visual Studio, VSCode is way higher priority. This also make it probably worse with any other editor that we could integrate that respect the markdown field correctly.
After (the inline code are not escaped and words are highlighted by some logic)

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems VS has a different way to parse the markdown doc. @mzhongl524 , please help to file a ticket to VS team to see whether it's a bug of them or they do have a different expectation of the passed markdown doc. It's better for us to guess here. thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this just feels like a bug with Visual studio, we are now cheating something to make Visual Studio work while VSCode and any other editor that actually respect the markdown(as the contract says) is now worse.
@@ -1358,7 +1358,8 @@ describe("identifiers", () => { | |||
kind: CompletionItemKind.Field, | |||
documentation: { | |||
kind: MarkupKind.Markdown, | |||
value: "(model property)\n```typespec\nMyLogArg.msg: string\n```\n\nmy log message", | |||
value: | |||
"(model property)\n```typespec\nMyLogArg.msg: string\n```\n\n```\nmy log message\n```", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so is the difference that you always put everything in fence? a bit confused on what that makes different.
Would maybe update those expected value to defined this way, it is quite hard to make sense of it right now with everything inline
[
"...",
"..."
].join("\n")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The display of getHover
in vscode is the same as before, but in vs, getHover
can get the same result as vscode, instead of missing some content
Fix: #1817
Make the hover prompts in vs and vscode consistent