@@ -32,6 +32,12 @@ def initialize
32
32
@rails_runner_client = T . let ( NullClient . new , RunnerClient )
33
33
@global_state = T . let ( nil , T . nilable ( GlobalState ) )
34
34
@outgoing_queue = T . let ( nil , T . nilable ( Thread ::Queue ) )
35
+ @settings = T . let (
36
+ {
37
+ enable_pending_migration_prompt : true ,
38
+ } ,
39
+ T ::Hash [ Symbol , T . untyped ] ,
40
+ )
35
41
@addon_mutex = T . let ( Mutex . new , Mutex )
36
42
@client_mutex = T . let ( Mutex . new , Mutex )
37
43
@client_mutex . lock
@@ -58,6 +64,9 @@ def activate(global_state, outgoing_queue)
58
64
@outgoing_queue = outgoing_queue
59
65
@outgoing_queue << Notification . window_log_message ( "Activating Ruby LSP Rails add-on v#{ VERSION } " )
60
66
67
+ addon_settings = @global_state . settings_for_addon ( name )
68
+ @settings . merge! ( addon_settings ) if addon_settings
69
+
61
70
register_additional_file_watchers ( global_state : global_state , outgoing_queue : outgoing_queue )
62
71
63
72
# Start booting the real client in a background thread. Until this completes, the client will be a NullClient
@@ -258,6 +267,7 @@ def fixture_file_watcher
258
267
def offer_to_run_pending_migrations
259
268
return unless @outgoing_queue
260
269
return unless @global_state &.client_capabilities &.window_show_message_supports_extra_properties
270
+ return unless @settings [ :enable_pending_migration_prompt ]
261
271
262
272
migration_message = @rails_runner_client . pending_migrations_message
263
273
return unless migration_message
0 commit comments