@@ -218,7 +218,7 @@ def run(item)
218
218
#{ Color . bold ( "stree help" ) }
219
219
Display this help message
220
220
221
- #{ Color . bold ( "stree lsp" ) }
221
+ #{ Color . bold ( "stree lsp [OPTIONS] " ) }
222
222
Run syntax tree in language server mode
223
223
224
224
#{ Color . bold ( "stree version" ) }
@@ -239,6 +239,20 @@ class << self
239
239
def run ( argv )
240
240
name , *arguments = argv
241
241
242
+ # If there are any plugins specified on the command line, then load them
243
+ # by requiring them here. We do this by transforming something like
244
+ #
245
+ # stree format --plugins=haml template.haml
246
+ #
247
+ # into
248
+ #
249
+ # require "syntax_tree/haml"
250
+ #
251
+ if arguments . first &.start_with? ( "--plugins=" )
252
+ plugins = arguments . shift [ /^--plugins=(.*)$/ , 1 ]
253
+ plugins . split ( "," ) . each { |plugin | require "syntax_tree/#{ plugin } " }
254
+ end
255
+
242
256
case name
243
257
when "help"
244
258
puts HELP
@@ -282,20 +296,6 @@ def run(argv)
282
296
return 1
283
297
end
284
298
285
- # If there are any plugins specified on the command line, then load them
286
- # by requiring them here. We do this by transforming something like
287
- #
288
- # stree format --plugins=haml template.haml
289
- #
290
- # into
291
- #
292
- # require "syntax_tree/haml"
293
- #
294
- if arguments . first &.start_with? ( "--plugins=" )
295
- plugins = arguments . shift [ /^--plugins=(.*)$/ , 1 ]
296
- plugins . split ( "," ) . each { |plugin | require "syntax_tree/#{ plugin } " }
297
- end
298
-
299
299
# We're going to build up a queue of items to process.
300
300
queue = Queue . new
301
301
0 commit comments