vscode插件开发----在编辑栏上增加菜单项

在package.json做如下配置:

  "contributes": {
    "commands": [
      {
        "command": "codeStat.countCurFile",
        "title": "统计当前文件"
      }
    ],
    "menus": {
      "editor/title": [
        {
          "command": "codeStat.countCurFile",
          "group": "navigation"
        }
      ]
    }
  }

这样就可以在编辑栏的右上角增加对应的菜单项了:
image

posted @ 2023-06-04 14:48  顺其自然,道法自然  阅读(243)  评论(0编辑  收藏  举报