psalm / psalm-vscode-plugin

VS Code plugin for Psalm
MIT License
44 stars 14 forks source link

Folder level settings #268

Open limarkxx opened 1 year ago

limarkxx commented 1 year ago

The goal of this PR is to support multi-root workspaces, by changing the scope of configuration setting contribution points to resource instead of the default window, and fully supporting those changes in behavior.

This should allow the user to configure unique psalm language server settings for each workspace folder in a multi-root workspace. Such a configuration should spawn a separate php psalm process for each workspace folder, allowing each workspace to operate using different php versions, different psalm.xml files, etc.

Note: the fixtures folder contains a sample multi-root workspace setup

tm1000 commented 1 year ago

This looks great. Just need to play with it.

I'm currently writing a test runner extension for php for vscode and I've switched to using resource as well so I agree with this overall

limarkxx commented 1 year ago

I moved all the testing stuff to https://github.com/psalm/psalm-vscode-plugin/pull/269 because it was getting tough to read, and also I don't have any actual tests yet.

limarkxx commented 11 months ago

https://github.com/vimeo/psalm/issues/10094 prevents multiple LSP instances currently

limarkxx commented 11 months ago

You can start a codespace in https://github.com/limarkxx/psalm-vscode-plugin/tree/test-folder-level-settings to test with a sample project