Skip to content
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

$(iconName) markdown string cannot be rendered as icon in vscode hover #429

Open
LSTM-Kirigaya opened this issue Oct 29, 2024 · 0 comments

Comments

@LSTM-Kirigaya
Copy link

In vscode extension development, I always use $(iconName) to render a build-in vscode icon or custom registered icon in forend. For example, screenshot of following displays six icon rendered in hover view.

image

But in tower lsp, the same code cannot work:

pub fn hover_module_declaration(
    server: &LSPServer,
    token_name: &str,
    language_id: &str
) -> Option<Hover> {

    let markdown = MarkupContent {
        kind: MarkupKind::Markdown,
        value: "$(eye) $(heart) $(mark-github) GitHub".to_string()
    };

    let hover = Hover {
        contents: HoverContents::Markup(markdown),
        range: None
    };

    Some(hover)
}

Hover render result:

image

As you can see "$(eye) $(heart) $(mark-github) GitHub" is not rendered to icons in vscode. I wonder if $(iconName) rendering is part of lsp or vscode does some postprocessing in forend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant