Skip to content

Commit

Permalink
Updates for Multiple Language Server CompletionOptions Support (#1948)
Browse files Browse the repository at this point in the history
* Updates for Multiple Language Server CompletionOptions Support

Fixes: https://github.com/dotnet/aspnetcore/issues/21346
  • Loading branch information
TanayParikh authored Jul 14, 2020
1 parent 3e26ced commit 06848c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ public CompletionRegistrationOptions GetRegistrationOptions()
DocumentSelector = RazorDefaults.Selector,
ResolveProvider = true,
TriggerCharacters = new Container<string>("@", "<", ":"),

// NOTE: This property is *NOT* processed in O# versions < 0.16
// https://github.com/OmniSharp/csharp-language-server-protocol/blame/bdec4c73240be52fbb25a81f6ad7d409f77b5215/src/Protocol/Server/Capabilities/CompletionOptions.cs#L35-L44
AllCommitCharacters = new Container<string>(":", ">", " ", "=" ),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class InitializeHandler : IRequestHandler<InitializeParams, InitializeR
{
CompletionProvider = new CompletionOptions()
{
AllCommitCharacters = new[] { " ", ".", ";", ">", "=", ":", "(", ")", "[", "]", "{", "}", "!" }, // This is necessary to workaround a bug where the commit character in CompletionItem is not respected. https://github.com/dotnet/aspnetcore/issues/21346
AllCommitCharacters = new[] { " ", ".", ";", ">", "=", "(", ")", "[", "]", "{", "}", "!" },
ResolveProvider = true,
TriggerCharacters = new[] { ".", "@", "<", "&", "\\", "/", "'", "\"", "=", ":", " " }
},
Expand Down

0 comments on commit 06848c4

Please sign in to comment.