Skip to content

add config option insert_completion #2226

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

Closed
wants to merge 1 commit into from

Conversation

BiggerBen13
Copy link

Adds the option to use insertText completionitems instead of textEdit completionitems implying that filtering needs to be done on the client. This is probably a niche fix as most editors filter regardless, of which which completion kind is received. NeoVim declared this behavior as intentional so this pr represents a workaround, until zls filters auto completions on its own

@sweiglbosker
Copy link

Looks good.

.{ .InsertReplaceEdit = .{ .newText = item.insertText orelse item.label, .insert = insert_range, .replace = replace_range } }
else
.{ .TextEdit = .{ .newText = item.insertText orelse item.label, .range = insert_range } };
switch (builder.server.config.insert_completions) {

Choose a reason for hiding this comment

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

uh, why switch

@Techatrix
Copy link
Member

This workaround should not be necessary with 5449f65. Let me know if it resolves your issue. If not, please provide a reproducible example that showcases the observed issue.

@sweiglbosker
Copy link

yeah that solution seems better to me, should work.

@Techatrix
Copy link
Member

No response from OP so I am going to assume that this issue has been resolved by 5449f65. If the issue is still present, please open a new issue with a reproducible example.

@Techatrix Techatrix closed this Apr 6, 2025
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.

4 participants