From 17715ada2ac78d449945ee499b9850df47b4ed21 Mon Sep 17 00:00:00 2001 From: Allison Chou Date: Wed, 18 Jan 2023 12:08:06 -0800 Subject: [PATCH] Disable snippets in sync completion logic --- .../Services/Completion/CompletionListBuilder_Sync.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OmniSharp.Roslyn.CSharp/Services/Completion/CompletionListBuilder_Sync.cs b/src/OmniSharp.Roslyn.CSharp/Services/Completion/CompletionListBuilder_Sync.cs index 7c4982bbee..4776a1e7b3 100644 --- a/src/OmniSharp.Roslyn.CSharp/Services/Completion/CompletionListBuilder_Sync.cs +++ b/src/OmniSharp.Roslyn.CSharp/Services/Completion/CompletionListBuilder_Sync.cs @@ -61,6 +61,13 @@ internal static partial class CompletionListBuilder { TextSpan changeSpan = typedSpan; var completion = completions.ItemsList[i]; + + // To-do: Add support for snippet items: https://github.com/OmniSharp/omnisharp-roslyn/issues/2485 + if (completion.GetProviderName() == SnippetCompletionProvider) + { + continue; + } + var insertTextFormat = InsertTextFormat.PlainText; string labelText = completion.DisplayTextPrefix + completion.DisplayText + completion.DisplayTextSuffix; List? additionalTextEdits = null;