简体   繁体   English

如何在vscode扩展的状态栏(setStatusBarMessage)中设置自定义图标和标志?

[英]How to set the custom icons & logos in the status bar (setStatusBarMessage) of vscode extension?

I am developing a vs-code extension in which i want set the icons in the status bar but i am facing issue.我正在开发一个 vs-code 扩展,我想在状态栏中设置图标,但我遇到了问题。

import * as vscode from 'vscode';
...
export function activate(context: vscode.ExtensionContext) {
    ...

    let disposable = vscode.commands.registerCommand('extension.helloWorld', () => { 
            ....
            //on the place of icon i want the icon to get display in the status bar
                  vscode.window.setStatusBarMessage(
                    "icon "+" icon "+  
                    data1 +
                    " icon " +
                    data2 +
                    " icon" +
                    data3
                  );
                  ...
                  ...
});
...
}

export function deactivate() {}

You can find a list of available icons here (custom icons are not supported):您可以在此处找到可用图标列表(不支持自定义图标):

https://code.visualstudio.com/api/references/icons-in-labelshttps://code.visualstudio.com/api/references/icons-in-labels

They are used via $(icon-name) syntax, for instance $(alert) which will produce它们通过$(icon-name)语法使用,例如$(alert)将产生. .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM