-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Hover / Suggest inconsistency: Plaintext Linebreak #79840
Comments
The problem comes from our API:
type MarkedString = MarkdownString | string | { language: string; value: string }
class CompletionItem {
documentation?: string | MarkdownString
}
class Hover {
contents: MarkedString[]
} Observations:
This somewhat makes sense, since However in LSP we have: type MarkupKind = 'plaintext' | 'markdown'
interface MarkupContent {
kind: MarkupKind
value: string
}
interface Hover {
contents: MarkupContent | MarkedString | MarkedString[]
}
interface CompletionItem {
documentation?: string | MarkupContent
} Observations:
We can fix this by allowing class Hover {
contents: (MarkedString | string)[]
} for VS Code API, and make LSP node library adopt it. |
I do see the problem that we don't support For the describe problem with the line break |
I'm wondering if this change should happen in the LS client library or vscode side, since https://github.com/microsoft/vscode/blob/master/src/vs/base/common/htmlContent.ts#L25 export class MarkdownString {
/**
* Appends and escapes the given string to this markdown string.
* @param value Plain text.
*/
appendText(value: string): MarkdownString;
} |
👍 for fixing this in |
@octref nice! |
Doesn't work for me. I think the change also needs to be done here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/api/common/extHostTypes.ts#L1230 |
Good catch. My bad. |
Split from #78718:
Plaintext Linebreak
The text was updated successfully, but these errors were encountered: