@@ -17,14 +17,6 @@ parser = OptionParser.new do |opts|
1717 options [ :debug ] = true
1818 end
1919
20- opts . on ( "--time-index" , "Measure the time it takes to index the project" ) do
21- options [ :time_index ] = true
22- end
23-
24- opts . on ( "--doctor" , "Run troubleshooting steps" ) do
25- options [ :doctor ] = true
26- end
27-
2820 opts . on ( "--use-launcher" , "[EXPERIMENTAL] Use launcher mechanism to handle missing dependencies gracefully" ) do
2921 options [ :launcher ] = true
3022 end
@@ -110,44 +102,6 @@ if options[:debug]
110102 end
111103end
112104
113- if options [ :time_index ]
114- index = RubyIndexer ::Index . new
115-
116- time_start = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
117- index . index_all
118- elapsed_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC ) - time_start
119-
120- entries = index . instance_variable_get ( :@entries )
121- entries_by_entry_type = entries . values . flatten . group_by ( &:class )
122-
123- puts <<~MSG
124- Ruby LSP v#{ RubyLsp ::VERSION } : Indexing took #{ elapsed_time . round ( 5 ) } seconds and generated:
125- - #{ entries_by_entry_type . sort_by { |k , _ | k . to_s } . map { |k , v | "#{ k . name . split ( "::" ) . last } : #{ v . size } " } . join ( "\n - " ) }
126- MSG
127- return
128- end
129-
130- if options [ :doctor ]
131- index = RubyIndexer ::Index . new
132-
133- if File . exist? ( ".index.yml" )
134- begin
135- config = YAML . parse_file ( ".index.yml" ) . to_ruby
136- rescue => e
137- abort ( "Error parsing config: #{ e . message } " )
138- end
139- index . configuration . apply_config ( config )
140- end
141-
142- puts "Globbing for indexable files"
143-
144- index . configuration . indexable_uris . each do |uri |
145- puts "indexing: #{ uri } "
146- index . index_file ( uri )
147- end
148- return
149- end
150-
151105server = RubyLsp ::Server . new
152106
153107# Ensure all output goes out stderr by default to allow puts/p/pp to work
0 commit comments