-
Notifications
You must be signed in to change notification settings - Fork 234
Cohosting OnAutoInsert endpoint #10776
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
Merged
Merged
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
b9abac6
Factoring out AutoInsertService
alexgav 330a670
Switch non-cohost endpoint to use new AutoInsertService
alexgav fe520b8
Adding Remote and OOB AutoInsertService classes and OnAutoInsertProvi…
alexgav c5506e6
Add common code for capabilities
alexgav 3f74c03
Add cohost OnAutoInsert endpoint
alexgav 85cf1f1
Parameter rename
alexgav be0e85f
Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInse…
alexgav 3ee7479
Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInse…
alexgav 5cb62c3
Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInse…
alexgav 38c9436
Fixup after rebase
alexgav 4a6d7f6
More post-build cleanup
alexgav 09452b5
Move common HTML and C# auto-insert trigger chars per CR suggestion
alexgav 447dd54
More cleanup after rebase
alexgav 70430a4
Add IOnAutoInsertTiggerCharacterProvider per CR suggestion
alexgav 02db4e4
Removing trigger characters property from RemoteAutoInsertService per…
alexgav b3ec796
Switch to using RemoteResponse
alexgav 2813a97
Fixup bad resolve after rebase, and extra whitespace in RazorLangauge…
alexgav f19fd7f
Complete capabilities check in CohostingOnAutoInsertEndpoing registra…
alexgav 1dbc2c2
Change input position type to serializable :LinePosition
alexgav c324f34
Fixing RemoteInsertTextEdit to use properly annotated (for serializat…
alexgav 10c8c15
Support for delegating auto-insert to C#
alexgav c5dd51a
Fixup after rebase
alexgav 2fd5c8a
Fixup AutoClosingTagOnAutoInsertProviderTest tests
alexgav 75f73a0
Fixinfg up CloseTextTagOnAutoInsertProviderTest tests
alexgav 2c40c10
Fixing up OnAutoInsertEndpointTest (which also tests the new AutoInse…
alexgav 770808f
Fixing duplicate OnAutoInsert handler registration (bad merge after r…
alexgav bf7c45e
Fixes to MEF composition issue and capabilities check
alexgav ced0724
Fixing incorrect export type
alexgav 52c7acb
Minor cleanup per CR suggestions
alexgav 6808099
Switching parameters to RazorCodeDocument and removing async in a lot…
alexgav d72bbb0
Fixing build - removing unneeded using
alexgav 4170302
Fix RemoteAutoInsertService logic to follow existing code (always pre…
alexgav 5c36ad1
Check allowed trigger characters before delegating to other languages…
alexgav e695e4a
Plumbing through actual option values we need and using them
alexgav ca86e8f
Fixup After Rebase
alexgav 0970a46
Consuming RazorFormattingService in remote OnAutoInsert service
alexgav 8db5313
Fixing exception in RemoteProjectSnapshot.Configuration
alexgav 2357c4a
Switch to PreferHtmlInAttributeValuesDocumentPositionInfoStrategy as …
alexgav 536fe77
Cleanup usings
alexgav 5e47c94
More usings cleanup
alexgav e2d4b65
PR feedback - minor cleanup and removal of InsertTextEdit type in fav…
alexgav 614af2e
PR feedback - removing MEF usage from RemoteAdhocWorkspaceFactory, mi…
alexgav 0f1d30d
PR feedback
alexgav 01d3d80
Type and method renames, minor cleanup per PR feedback
alexgav 7d61fbf
Renaming interface methods, removing unnecessary usage of FrozenSet
alexgav a7df9ef
Use ImmutableArray to store providers
alexgav 34beda3
Switching to bool and out on IAutoInsertService and implementation
alexgav a4beaef
Cleaned up document position info calculation per PR feedback
alexgav 4613364
Minor cleanup in RemoteAutoInsertService
alexgav bf389fb
Cleanup trigger character calculation in CohostOnAutoInsertEndpoint
alexgav c9e5130
Formatting changes, VsLspFactory usage
alexgav 9d339ef
Revert to MEF DI in RemoteAdhocWorkspaceFactory/RemoteRazorFormatting…
alexgav a629cf3
Removing Rolsyn to VS LSP extension methods
alexgav 46c9356
Switch to raw strings in tests and minor whitespace cleanup
alexgav 0eab010
Rename per PR feedback suggestion to better indicate the purpose
alexgav 7bb3d32
Cleanup formatting code document acquisition per PR feedback
alexgav e53bf51
Removing redundant assert as compiler is already doing the check
alexgav 348f76f
Unnecessary assignment cleanup
alexgav c984b46
Misc PR feedback cleanup
alexgav 3f9fe84
Made GetGeneratedOutputAsync an extension method per PR feedback
alexgav 69105c1
Remaining MEF parameter attrivute formatting changes
alexgav 137d9ad
Last of the PR feedback.
alexgav 7715a4c
Fixing most unit test failures.
alexgav ffaa2ef
Fixing last 4 unit test failures
alexgav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
.../Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/IOnAutoInsertProvider.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...Microsoft.AspNetCore.Razor.LanguageServer/Formatting/LspFormattingCodeDocumentProvider.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT license. See License.txt in the project root for license information. | ||
|
|
||
| using System.Threading.Tasks; | ||
| using Microsoft.AspNetCore.Razor.Language; | ||
| using Microsoft.CodeAnalysis.Razor.Formatting; | ||
| using Microsoft.CodeAnalysis.Razor.ProjectSystem; | ||
|
|
||
| namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; | ||
|
|
||
| internal sealed class LspFormattingCodeDocumentProvider : IFormattingCodeDocumentProvider | ||
| { | ||
| public Task<RazorCodeDocument> GetCodeDocumentAsync(IDocumentSnapshot snapshot) | ||
| { | ||
| var useDesignTimeGeneratedOutput = snapshot.Project.Configuration.LanguageServerFlags?.ForceRuntimeCodeGeneration ?? false; | ||
| return snapshot.GetGeneratedOutputAsync(useDesignTimeGeneratedOutput); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.