goblint / GobPie

Goblint IDE integration via MagpieBridge
MIT License
5 stars 3 forks source link

Support VS Code settings system and `workspace/configuration` in addition to gobpie.json #59

Open FeldrinH opened 1 year ago

FeldrinH commented 1 year ago

Most of the settings in gobpie.json are things that you would want to set per computer, not per folder. Given this, I think it would make sense to use VS Code's intended solution for managing extension configuration, which as far as I can tell is declaring settings in contributes.configuration and reading them from Gobpie using the LSP worspace/configuration request.

If this is implemented we could get rid of gobpie.json entirely and since VS Code supports overriding settings per-folder this would result in no loss of flexibility and an improvement in usability.

karoliineh commented 1 year ago

How well does it scale to other IDEs? Although we are not currently having plugins for any other IDE than VS Code, it would be pointless to restrict GobPie to VS Code only. Otherwise why even use MagpieBridge and not implement a VS Code plugin directly?

If the IDEs manage extension configurations similarly, with no major modifications needed for extending to any other IDE, this can replace the JSON file. Otherwise, I would suggest we can implement it for VS Code, but the JSON option for settings should still stay as an alternative.

FeldrinH commented 1 year ago

As far as I can find vim and emacs should have good support for workspace/configuration, however I'm not sure if they have any support at all for the browser windows that GobPie needs.

Intellij LSP (https://github.com/gtache/intellij-lsp) is unmaintained and MagpieBridge's implementation (https://github.com/MagpieBridge/IntelliJLSP) doesn't appear to support workspace/configuration, so IntelliJ support is unlikely, unless we put in the work to implement it ourselves.

As far as I can tell (the documentation is practically nonexistent for this) Eclipse does support the request, but you have to implement the configuration UI yourself. There is probably a generic configuration system somewhere in Eclipse's plugin infrastructure that can simplify this.

FeldrinH commented 1 year ago

However, this isn't really an either-or situtation. We could use gobpie.json if it exists and otherwise fall back to workspace/configuration and if that is unsupported then fall back to a default configuration.

That could improve the UX on VSCode and other IDE-s with workspace/configuration support for a relatively small effort.

sim642 commented 1 year ago

We could use gobpie.json if it exists and otherwise fall back to workspace/configuration

It would be best if the two configurations could be merged per-field because some (e.g. preAnalyzeCommand) are specified for the project and thus likely in goblint.json, while others (e.g. goblintExecutable) are user-specific.