-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Snippets: If snippet and use of LSP's SnippetExpander #60860
Merged
akhera99
merged 64 commits into
dotnet:features/semantic-snippets
from
akhera99:features/snippets_2
May 10, 2022
Merged
Changes from 56 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
05edfc3
Merge remote-tracking branch 'upstream/features/semantic-snippets' in…
akhera99 4ee5f98
start work on if snippet
akhera99 f7ff1ad
wip
akhera99 bf3685c
wip
akhera99 74f5583
wip
akhera99 fa96642
wip
akhera99 3fbf4c7
wip
akhera99 977529d
tests
akhera99 14de21f
Merge remote-tracking branch 'upstream/features/semantic-snippets' in…
akhera99 2c1ed38
wip
akhera99 c705fd8
wip
akhera99 d84a6c5
Merge remote-tracking branch 'upstream/features/semantic-snippets' in…
akhera99 85c12cc
lsp service now works
akhera99 293e2b5
lots of changes
akhera99 b8593eb
wip
akhera99 105e658
Merge branch 'main' into features/snippets_2
akhera99 e137363
remove added changes
akhera99 e78d2d4
fixes
akhera99 9220332
cleanup
akhera99 5e4aefe
comments
akhera99 334331b
remove unused file
akhera99 ddd0aab
revert change made
akhera99 f4f0aea
update
akhera99 3230e0a
fix random file change
akhera99 ddfedf3
simplify
akhera99 29c41a6
cleanup/comments
akhera99 61ffd0e
remove unused attribute
akhera99 fae94b9
Merge remote-tracking branch 'upstream/features/semantic-snippets' in…
akhera99 35ba79b
pr feedback
akhera99 6588ac4
pr feedback, need to fix tests
akhera99 b09573d
fix tests
akhera99 76c70e1
fix/add comments
akhera99 29e3e17
more fixes
akhera99 51e7377
more pr feedback
akhera99 05e839f
lots of fixes
akhera99 631d80d
pr feedback
akhera99 f257f52
naming
akhera99 7f7c087
lots of changes + added new tests
akhera99 6ef9f5d
comments
akhera99 c281d2a
more fixes
akhera99 7002563
bug
akhera99 1940bb2
fix
akhera99 02a1a15
merge main
akhera99 e6254ed
options changed
akhera99 a4e669f
tests wrong and I did stupid stuff as a result
akhera99 93c8e9a
remove unnecessary code
akhera99 75970d1
comments
akhera99 d26a3a4
cleanup, need to add more tests
akhera99 fae4cff
tests
akhera99 08c22d6
every iteration
akhera99 973b95b
regions for easier viewing
akhera99 ed94922
no changes
akhera99 1a87816
feedback
akhera99 6baf3b3
pr feedback
akhera99 5021c4e
remove unused method
akhera99 2c2be6b
fix bug
akhera99 c244e00
feedback
akhera99 74111f9
way more tests
akhera99 af2aada
handle same positions better
akhera99 f36a262
comments
akhera99 c8f674f
tests
akhera99 6e33b9d
pr feedback
akhera99 2498eff
removed unnecessary check
akhera99 d02e1c2
fix
akhera99 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 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
28 changes: 28 additions & 0 deletions
28
...t/Completion/CompletionProviders/Snippets/AbstractCSharpSnippetCompletionProviderTests.cs
This file contains 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,28 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.CSharp.Completion.CompletionProviders.Snippets; | ||
using Microsoft.CodeAnalysis.Snippets; | ||
using Microsoft.CodeAnalysis.Test.Utilities; | ||
|
||
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionProviders.Snippets | ||
{ | ||
public abstract class AbstractCSharpSnippetCompletionProviderTests : AbstractCSharpCompletionProviderTests | ||
{ | ||
protected abstract string ItemToCommit { get; } | ||
|
||
protected override TestComposition GetComposition() | ||
=> base.GetComposition() | ||
.AddExcludedPartTypes(typeof(IRoslynLSPSnippetExpander)) | ||
.AddParts(typeof(TestRoslynLanguageServerSnippetExpander)); | ||
|
||
internal override Type GetCompletionProviderType() | ||
=> typeof(CSharpSnippetCompletionProvider); | ||
} | ||
} |
This file contains 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.
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.
as per before, i would not do this as a provider test. especially for something as complex as snippets.
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.
at this point, it's basically just testing that the data I retrieve for a snippet is correct. I can remove it the tests.