Skip to content

Conversation

@sam-mccall
Copy link
Member

As recommended in microsoft/vscode#78806 This is an incomplete fix but better than nothing. Also files microsoft/vscode#164310 in case VSCode can improve the behavior here.

fixes #390

…iate.

As recommended in microsoft/vscode#78806
This is an incomplete fix but better than nothing.
Also files microsoft/vscode#164310 in case
VSCode can improve the behavior here.

fixes clangd#390
@sam-mccall sam-mccall requested a review from hokein October 22, 2022 00:46
// They say a plugin should trigger this, but LSP has no mechanism.
// https://github.com/microsoft/language-server-protocol/issues/274
// (This workaround is incomplete, and only helps the first param).
if (item.insertText instanceof vscode.SnippetString &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional that the workaround is not reached if the user has set "clangd.serverCompletionRanking": false (which causes us to early-return near the top of this function)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The likely answer here is that there's no reason the workaround couldn't also apply to the "clangd.serverCompletionRanking": false case, we'd just have to reorganize the code a bit to handle that case as well. We can do that in a follow-up patch if anyone asks for it.)

@HighCommander4
Copy link
Contributor

This patch has been reviewed and approved, with no further activity on it for over a year. I'm not aware of any outstanding concerns about it. (I remain curious about the question I asked, but it's not an issue that needs to block the patch.)

I'm going to go ahead and merge this.

@HighCommander4 HighCommander4 merged commit f7b1f26 into clangd:master Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger signature help after accepting a function completion.

3 participants