-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix object property completion when have hyphen #1808
Conversation
91f63a6
to
76e5ddf
Compare
76e5ddf
to
02208d8
Compare
This comment has been minimized.
This comment has been minimized.
02208d8
to
22e5ff1
Compare
22e5ff1
to
1707726
Compare
I have a simpler fix. The ranking is not preserved but that's a VS Code issue: microsoft/vscode#103682 |
return { | ||
uri: doc.uri, | ||
position, | ||
preselect: entry.isRecommended ? true : undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll split this into another commit...Let one PR do one thing, don't include unrelated changes, or it becomes harder to review. Thanks!
const { label, detail } = calculateLabelAndDetailTextForPathImport(entry); | ||
const kind = toCompletionItemKind(entry.kind); | ||
const insertTextFormat = | ||
kind === CompletionItemKind.Function || kind === CompletionItemKind.Method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In VS Code this is behind typescript.suggest.completeFunctionCalls
which defaults to false. I don't think we should turn this on by default.
kind === CompletionItemKind.Function || kind === CompletionItemKind.Method | ||
? InsertTextFormat.Snippet | ||
: undefined; | ||
const insertText = entry.insertText || entry.name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do this. If entry.insertText
is undefined just pass it in.
I think it's ok to merge now. The |
Fixed #1804