This change replaces the messages that tell the user to reload with automatic calls to the restart function. This way, config changes are automatically reflected - I tested it out locally and it worked pretty nicely. Most of the code to do this was already there, it was just a matter of reordering it correctly and making sure to deregister/re-register the default providers. I also added the mtime check for the language server binary as part of the config.
The only other thing that might be still missing is automatic restarts when the language server binary changes on disk, but that might be too much - probably wouldn't be intuitive for the user.
Sorry about the huge PR! It's a lot of code shuffling, and there's one function that I moved back to its original place after https://github.com/microsoft/vscode-go/pull/3186 - sorry about that!
This change replaces the messages that tell the user to reload with automatic calls to the restart function. This way, config changes are automatically reflected - I tested it out locally and it worked pretty nicely. Most of the code to do this was already there, it was just a matter of reordering it correctly and making sure to deregister/re-register the default providers. I also added the mtime check for the language server binary as part of the config.
The only other thing that might be still missing is automatic restarts when the language server binary changes on disk, but that might be too much - probably wouldn't be intuitive for the user.
After this is merged, it will be really simple to implement https://github.com/microsoft/vscode-go/issues/3128.
Sorry about the huge PR! It's a lot of code shuffling, and there's one function that I moved back to its original place after https://github.com/microsoft/vscode-go/pull/3186 - sorry about that!
/cc @hyangah