@@ -144,6 +144,10 @@ def workspace_did_change_watched_files(changes)
144
144
145
145
offer_to_run_pending_migrations
146
146
end
147
+
148
+ if changes . any? { |c | c [ :uri ] . end_with? ( ".yml" ) || c [ :uri ] . end_with? ( ".yaml" ) }
149
+ # TODO
150
+ end
147
151
end
148
152
149
153
sig { override . returns ( String ) }
@@ -223,19 +227,30 @@ def register_additional_file_watchers(global_state:, outgoing_queue:)
223
227
id : "workspace/didChangeWatchedFilesRails" ,
224
228
method : "workspace/didChangeWatchedFiles" ,
225
229
register_options : Interface ::DidChangeWatchedFilesRegistrationOptions . new (
226
- watchers : [
227
- Interface ::FileSystemWatcher . new (
228
- glob_pattern : "**/*structure.sql" ,
229
- kind : Constant ::WatchKind ::CREATE | Constant ::WatchKind ::CHANGE | Constant ::WatchKind ::DELETE ,
230
- ) ,
231
- ] ,
230
+ watchers : [ structure_sql_file_watcher , yaml_file_watcher ] ,
232
231
) ,
233
232
) ,
234
233
] ,
235
234
) ,
236
235
)
237
236
end
238
237
238
+ sig { returns ( Interface ::FileSystemWatcher ) }
239
+ def structure_sql_file_watcher
240
+ Interface ::FileSystemWatcher . new (
241
+ glob_pattern : "**/*structure.sql" ,
242
+ kind : Constant ::WatchKind ::CREATE | Constant ::WatchKind ::CHANGE | Constant ::WatchKind ::DELETE ,
243
+ )
244
+ end
245
+
246
+ sig { returns ( Interface ::FileSystemWatcher ) }
247
+ def yaml_file_watcher
248
+ Interface ::FileSystemWatcher . new (
249
+ glob_pattern : "**/*.yml" , # TODO: also YAML
250
+ kind : Constant ::WatchKind ::CREATE | Constant ::WatchKind ::CHANGE | Constant ::WatchKind ::DELETE ,
251
+ )
252
+ end
253
+
239
254
sig { void }
240
255
def offer_to_run_pending_migrations
241
256
return unless @outgoing_queue
0 commit comments