sandhje / vscode-phpmd

VSCode PHP Mess Detector extension
MIT License
15 stars 4 forks source link

Enabled parameter value overriding between user and workspace settings #53

Closed ghusse closed 4 years ago

ghusse commented 4 years ago

Hello,

I tried to configure this extension in my editor, and I had a had time figuring out why the extension did not seem to start at all.

I finally found that I disabled the extension in my user settings (between I don't want it to be launched on every project I work on), but I enabled it in my workspace settings.

When configuring the parameters like this, it seems that the parameter from the user settings takes precedence over the one configured in the workspace settings, which is not the expected behavior I guess.

sandhje commented 4 years ago

Hello,

First of all, sorry that I took so long to respond, kind a lost track of your issue :( apalogies for that.

Unfortunately this is behaviour that I, as an extension developer, cannot influence. I agree with you that this is very confusing, but please read this (lengthy) vscode issue and you'll see why... https://github.com/microsoft/vscode/issues/58038.

To give you a recap of that issue, please do not use the ui for workspace settings but edit them directly in your .vscode/settings.json file. That will give you the desired behaviour. Your settings.json would look something like:

"settings": {
    "phpmd.enabled": true
}

Hope it helps...