mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-05 17:24:59 -05:00
Fix auto-complete inserting brackets around function names (#895)
* Fix reserved words not to be bracket quoted * wip * More fixes * Better name * Format files and update test
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
{
|
||||
private static CompletionItem[] emptyCompletionList = new CompletionItem[0];
|
||||
|
||||
private static readonly string[] DefaultCompletionText = new string[]
|
||||
public static readonly string[] DefaultCompletionText = new string[]
|
||||
{
|
||||
"abs",
|
||||
"acos",
|
||||
@@ -488,8 +488,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
/// </summary>
|
||||
internal static bool IsReservedWord(string text)
|
||||
{
|
||||
int pos = Array.IndexOf(DefaultCompletionText, text.ToLower());
|
||||
return pos > -1;
|
||||
return DefaultCompletionText.Contains(text, StringComparer.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user