hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.02k stars 406 forks source link

local-storage setting is overwritten each time with null #298

Open ariel-bentu opened 2 years ago

ariel-bentu commented 2 years ago

I am trying to set a custom settings into the settings:

"hediet.vscode-drawio.local-storage": 
    {
        "somekey":{
            "somedeeperkey": false
        }
    }

every time I restart the draw editor, this settings gets lost. (other hediet.vscode-drawio settings are preserved). This happens both for user or workspace settings.

I am assuming this is the equivalent of draw's electron version of menu: Extra->Configuration? Any advice is welcome. Thanks

hediet commented 2 years ago

You should not use this setting. It is deprecated. I should remove it from package.json.

https://github.com/hediet/vscode-drawio/blob/master/src/Config.ts#L471

ariel-bentu commented 2 years ago

Ok I see. thanks for quick reply. Is there an alternative? I'm developing a draw.io plugin for TAM - Technical Architecture Modeling, here and I need to allow some configuration to it. Thanks!

hediet commented 2 years ago

I recommend you to ship your plugin as VS Code extension! (like this open source extension: https://marketplace.visualstudio.com/items?itemName=nopeslide.vscode-drawio-plugin-mermaid)

There you can read your own settings:

https://github.com/nopeslide/drawio_mermaid_plugin/blob/1bddba5cac9a0121bfc6fbde4f65e49b48f8a140/vscode/src/vscode_extension.ts#L11