Skip to content

Commit

Permalink
Completion suggestions require alphanumerics (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
onelivesleft authored and kosz78 committed Jan 21, 2020
1 parent 4698b16 commit 49291a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nimSuggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export class NimCompletionItemProvider implements vscode.CompletionItemProvider
var suggestions: vscode.CompletionItem[] = [];
if (items) {
items.forEach(item => {
if (item.answerType === 'sug' && (!txt || item.symbolName.toLowerCase().indexOf(txt) >= 0)) {
if (item.answerType === 'sug'
&& (!txt || item.symbolName.toLowerCase().indexOf(txt) >= 0)
&& /[a-z]/i.test(item.symbolName)) {
var suggestion = new vscode.CompletionItem(item.symbolName);
suggestion.kind = vscodeKindFromNimSym(item.suggest);
suggestion.detail = nimSymDetails(item);
Expand Down

0 comments on commit 49291a1

Please sign in to comment.