Visual Studio Code v1.17 中的折叠区域不起作用



我正在使用Visual Studio code v1.17,我正在用纯javascript进行Chrome扩展开发。Visual Studio code v1.17 支持 JavaScript 和其他几种语言的区域折叠功能。

因此,我在一个.js文件中创建了一个类,并在其中编写了getter setter方法。

//#region EmailObj
get EmailObj() {
    this._EmailObj = localStorage.getItem("CurrentEmail");
    try {
        this._EmailObj = JSON.parse(this._EmailObj);
    }
    catch(e) {
        this._EmailObj = null;
    }
    return this._EmailObj;
}
set EmailObj(newValue) {
    this._EmailObj = JSON.stringify(newValue);
    localStorage.setItem("CurrentEmail", this._EmailObj)
}
remove_EmailObj() {
    this._EmailObj = null;
    localStorage.removeItem("CurrentEmail");
}
//#endregion EmailObj

现在根据 https://code.visualstudio.com/updates/v1_17#_folding-regions 所述的文档。加号(+)图标应该显示在 #region 和 #endregion 部分附近(因此,我可以显示/隐藏特定区域),但它没有显示在那里。

所以,有人帮我,我在这里缺少什么?

我将 VS 代码更新到 1.17.2,它现在在我身边工作。

最新更新