Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Auto-restart the LSP on .rubocop.yml config changes #167

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

vinistock
Copy link
Member

If the RuboCop configuration changes, then we have to restart the LSP to reload the diagnostics and formatting runners. Otherwise, we keep processing files using the old configuration.

@vinistock vinistock added the enhancement New feature or request label Jul 25, 2022
@vinistock vinistock requested a review from a team July 25, 2022 13:34
@vinistock vinistock self-assigned this Jul 25, 2022
src/client.ts Outdated
@@ -177,6 +177,7 @@ export default class Client {

private registerAutoRestarts() {
this.createRestartWatcher("Gemfile.lock");
this.createRestartWatcher(".rubocop.yml");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also restart if a config file changed (or was added/removed) in a sub-directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed. I've added the **/ to the pattern.

@vinistock vinistock merged commit be16271 into main Jul 25, 2022
@vinistock vinistock deleted the vs/auto_restart_on_rubocop_config_change branch July 25, 2022 17:05
jayanth-kumar-morem pushed a commit to jayanth-kumar-morem/vscode-ruby-lsp that referenced this pull request Apr 26, 2023
…-static-and-runtime-0.5.10125

Bump sorbet-static-and-runtime from 0.5.10101 to 0.5.10125
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants