We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51ebcfd commit 4b5db40Copy full SHA for 4b5db40
1 file changed
packages/server/src/complete/complete.ts
@@ -245,7 +245,8 @@ class Completer {
245
this.addCandidatesForSelectStar(fromNodes, schemaAndSubqueries)
246
const expectedLiteralNodes =
247
e.expected?.filter(
248
- (v): v is ExpectedLiteralNode => v.type === 'literal'
+ (v): v is ExpectedLiteralNode =>
249
+ v.type === 'literal' && hasAtLeastTwoLetters(v.text)
250
) || []
251
this.addCandidatesForExpectedLiterals(expectedLiteralNodes)
252
this.addCandidatesForFunctions()
@@ -428,3 +429,7 @@ export function complete(
428
429
console.timeEnd('complete')
430
return { candidates: candidates, error: completer.error }
431
}
432
+
433
+function hasAtLeastTwoLetters(value: string): boolean {
434
+ return /[a-zA-Z].*[a-zA-Z]/.test(value)
435
+}
0 commit comments