Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow addons to register for filewatching events #1464

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Mar 6, 2024

Motivation

This goes along with Shopify/ruby-lsp-rails#282. We need ruby-lsp to notify the addon when particular files changes.

Implementation

Rather than explicitly registering to receive file change events, addons just need to define a workspace_did_change_watched_files method.

Automated Tests

Included

Manual Tests

Test alongside Shopify/ruby-lsp-rails#282 by making a change to the schema (e.g. add a comment) and watchking the output panel for a reload.

@andyw8 andyw8 added the server This pull request should be included in the server gem's release notes label Mar 6, 2024
@vinistock vinistock added the enhancement New feature or request label Mar 6, 2024
lib/ruby_lsp/executor.rb Outdated Show resolved Hide resolved
@andyw8 andyw8 marked this pull request as ready for review March 6, 2024 18:17
@andyw8 andyw8 requested a review from a team as a code owner March 6, 2024 18:17
@andyw8 andyw8 merged commit fdac2fb into main Mar 6, 2024
39 checks passed
@andyw8 andyw8 deleted the andyw8/allow-addons-to-register-for-file-change-events branch March 6, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants