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

Displaying incorrect icons in DocumentSymbolProvider #1214

Closed
tstr opened this issue Nov 29, 2018 · 1 comment
Closed

Displaying incorrect icons in DocumentSymbolProvider #1214

tstr opened this issue Nov 29, 2018 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@tstr
Copy link

tstr commented Nov 29, 2018

monaco-editor version: 0.14.3
Browser: Google Chrome
OS: Windows 10

When using the DocumentSymbolProvider, for certain SymbolKind values their icons seem to default to the Method icon despite the fact that the correct icons definitely do exist in monaco. CompletionItemKind doesn't have this issue and displays the correct icons.

I used this code to test each SymbolKind value.

monaco.languages.registerDocumentSymbolProvider('plaintext', {
    provideDocumentSymbols(model, token)
    {
        let kinds = Object.keys(monaco.languages.SymbolKind)
            .map(e => monaco.languages.SymbolKind[e])
            .filter(e => !isNaN(e));
        
        return kinds.map(kind => ({
            name: kind.toString() + " " + monaco.languages.SymbolKind[kind],
            containerName: "",
            kind: kind
        }));
    }
});

monaco.editor.create(document.getElementById("container"), {
    value: "",
    language: "plaintext"
});
@alexdima alexdima assigned alexdima and unassigned jrieken Dec 13, 2019
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Dec 13, 2019
@alexdima alexdima added this to the December 2019 milestone Dec 13, 2019
@alexdima
Copy link
Member

Fixed via microsoft/vscode@1bf341e

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants