-
Notifications
You must be signed in to change notification settings - Fork 234
Add cancellation for textDocument/completion
, textDocument/codeAction
, textDocument/folding
#1238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cancellation for textDocument/completion
, textDocument/codeAction
, textDocument/folding
#1238
Conversation
src/PowerShellEditorServices/Services/TextDocument/Handlers/FoldingRangeHandler.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/TextDocument/Handlers/CodeActionHandler.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs
Outdated
Show resolved
Hide resolved
Issues
======
+ Solved 5
- Added 4
Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/TextDocument/Handlers/CodeActionHandler.cs 1
- src/PowerShellEditorServices/Services/TextDocument/Handlers/FoldingRangeHandler.cs 1
Clones removed
==============
+ src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs -1
+ src/PowerShellEditorServices/Services/TextDocument/Handlers/HoverHandler.cs -1
+ src/PowerShellEditorServices/Services/TextDocument/Handlers/DefinitionHandler.cs -1
+ src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs -1
+ src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs -1
+ src/PowerShellEditorServices/Services/TextDocument/Handlers/FoldingRangeHandler.cs -1
See the complete overview on Codacy |
@@ -30,16 +30,22 @@ public FoldingRangeHandler(ILoggerFactory factory, ConfigurationService configur | |||
_configurationService = configurationService; | |||
_workspaceService = workspaceService; | |||
} | |||
public TextDocumentRegistrationOptions GetRegistrationOptions() | |||
|
|||
public FoldingRangeRegistrationOptions GetRegistrationOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetRegistrationOptions' a static method.
@@ -37,9 +38,17 @@ internal class DocumentFormattingHandlers : IDocumentFormattingHandler, IDocumen | |||
_workspaceService = workspaceService; | |||
} | |||
|
|||
public TextDocumentRegistrationOptions GetRegistrationOptions() | |||
public DocumentFormattingRegistrationOptions GetRegistrationOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetRegistrationOptions' a static method.
}; | ||
} | ||
|
||
DocumentRangeFormattingRegistrationOptions IRegistration<DocumentRangeFormattingRegistrationOptions>.GetRegistrationOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetRegistrationOptions' a static method.
_logger.LogInformation("highlight handler loaded"); | ||
} | ||
|
||
public TextDocumentRegistrationOptions GetRegistrationOptions() | ||
public DocumentHighlightRegistrationOptions GetRegistrationOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetRegistrationOptions' a static method.
apparently prereleases are also signed so we can go with this. |
Fixes PowerShell/vscode-powershell#2556
possibly fixes PowerShell/vscode-powershell#2518
possibly fixes PowerShell/vscode-powershell#2522
Probably should wait til a stable release of Omnisharp but they've fixed cancellation and this does feel faster in @adamdriscoll's ps1 talked about here: PowerShell/vscode-powershell#2556 (comment)
when testing in that ps1 for a bit I received this number of requests that wanted to be cancelled:
This PR could cancel 14 + 7 + 3 = 24 out of 29 requests (best case)