@@ -277,11 +277,11 @@ def document_symbols(self, doc_uri):
277
277
def execute_command (self , command , arguments ):
278
278
return self ._hook ('pylsp_execute_command' , command = command , arguments = arguments )
279
279
280
- def format_document (self , doc_uri ):
281
- return self ._hook ('pylsp_format_document' , doc_uri )
280
+ def format_document (self , doc_uri , options ):
281
+ return self ._hook ('pylsp_format_document' , doc_uri , options )
282
282
283
- def format_range (self , doc_uri , range ):
284
- return self ._hook ('pylsp_format_range' , doc_uri , range = range )
283
+ def format_range (self , doc_uri , range , options ):
284
+ return self ._hook ('pylsp_format_range' , doc_uri , range = range , options = options )
285
285
286
286
def highlight (self , doc_uri , position ):
287
287
return flatten (self ._hook ('pylsp_document_highlight' , doc_uri , position = position )) or None
@@ -361,19 +361,17 @@ def m_text_document__hover(self, textDocument=None, position=None, **_kwargs):
361
361
def m_text_document__document_symbol (self , textDocument = None , ** _kwargs ):
362
362
return self .document_symbols (textDocument ['uri' ])
363
363
364
- def m_text_document__formatting (self , textDocument = None , _options = None , ** _kwargs ):
365
- # For now we're ignoring formatting options.
366
- return self .format_document (textDocument ['uri' ])
364
+ def m_text_document__formatting (self , textDocument = None , options = None , ** _kwargs ):
365
+ return self .format_document (textDocument ['uri' ], options )
367
366
368
367
def m_text_document__rename (self , textDocument = None , position = None , newName = None , ** _kwargs ):
369
368
return self .rename (textDocument ['uri' ], position , newName )
370
369
371
370
def m_text_document__folding_range (self , textDocument = None , ** _kwargs ):
372
371
return self .folding (textDocument ['uri' ])
373
372
374
- def m_text_document__range_formatting (self , textDocument = None , range = None , _options = None , ** _kwargs ):
375
- # Again, we'll ignore formatting options for now.
376
- return self .format_range (textDocument ['uri' ], range )
373
+ def m_text_document__range_formatting (self , textDocument = None , range = None , options = None , ** _kwargs ):
374
+ return self .format_range (textDocument ['uri' ], range , options )
377
375
378
376
def m_text_document__references (self , textDocument = None , position = None , context = None , ** _kwargs ):
379
377
exclude_declaration = not context ['includeDeclaration' ]
0 commit comments