VSCode Extension API - Identify file or folder click in explorer context menu

前端 未结 5 1845
野趣味
野趣味 2020-12-06 18:42

VSCode 1.3 has added support for adding commands to context menus. Is there a way to identify whether a file or folder is clicked to open the explorer context menu?

5条回答
  •  青春惊慌失措
    2020-12-06 18:57

    Regarding obtaining a comprehensive list of context keys: in recent VSCode versions, there's a Developer: Inspect Context Keys command. After executing the command, it lets you pick a UI element:

    After that, the dev console opens, and you can expand the logged object that contains a full list of context keys and their current values in this "scope":

提交回复
热议问题