File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
src/PowerShellEditorServices/Services/TextDocument/Handlers Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 1717namespace Microsoft . PowerShell . EditorServices . Handlers
1818{
1919 // TODO: Add IDocumentOnTypeFormatHandler to support on-type formatting.
20+ // TODO: Use ABCs.
2021 internal class PsesDocumentFormattingHandlers : IDocumentFormattingHandler , IDocumentRangeFormattingHandler
2122 {
2223 private readonly ILogger _logger ;
@@ -39,21 +40,15 @@ public PsesDocumentFormattingHandlers(
3940 _workspaceService = workspaceService ;
4041 }
4142
42- public DocumentFormattingRegistrationOptions GetRegistrationOptions ( )
43+ public DocumentFormattingRegistrationOptions GetRegistrationOptions ( DocumentFormattingCapability capability , ClientCapabilities clientCapabilities ) => new DocumentFormattingRegistrationOptions
4344 {
44- return new DocumentFormattingRegistrationOptions
45- {
46- DocumentSelector = LspUtils . PowerShellDocumentSelector
47- } ;
48- }
45+ DocumentSelector = LspUtils . PowerShellDocumentSelector
46+ } ;
4947
50- DocumentRangeFormattingRegistrationOptions IRegistration < DocumentRangeFormattingRegistrationOptions > . GetRegistrationOptions ( )
48+ public DocumentRangeFormattingRegistrationOptions GetRegistrationOptions ( DocumentRangeFormattingCapability capability , ClientCapabilities clientCapabilities ) => new DocumentRangeFormattingRegistrationOptions
5149 {
52- return new DocumentRangeFormattingRegistrationOptions
53- {
54- DocumentSelector = LspUtils . PowerShellDocumentSelector
55- } ;
56- }
50+ DocumentSelector = LspUtils . PowerShellDocumentSelector
51+ } ;
5752
5853 public async Task < TextEditContainer > Handle ( DocumentFormattingParams request , CancellationToken cancellationToken )
5954 {
You can’t perform that action at this time.
0 commit comments