Skip to content

Fix completion on symbols ending in '.' #5676

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

Merged
merged 1 commit into from
May 2, 2025
Merged

Conversation

ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented May 2, 2025

Overview

Partial fix for the issue @pchiusano and Baccata were talking about in Discord: https://discord.com/channels/862108724948500490/1200119435931942994/1366397443964665867

Completion just didn't work when your cursor was after a dot, e.g. List.^

Looks like the names parser just didn't like names ending in '.'; now I just strip trailing dots, one line fix.

Test coverage

Nah

@ChrisPenner ChrisPenner requested a review from pchiusano May 2, 2025 18:32
@aryairani
Copy link
Contributor

Thanks -- what was the symptom exactly?

Copy link
Member

@pchiusano pchiusano left a comment

Choose a reason for hiding this comment

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

Nice! Here's an example of the old behavior @aryairani Notice no completions when I request them after List., but if I backspace out the . then it works.

CleanShot 2025-05-02 at 13 36 25

I don't totally get why it also works when I then re-add the .

@pchiusano pchiusano added the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label May 2, 2025
@ChrisPenner ChrisPenner removed the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label May 2, 2025
@ChrisPenner
Copy link
Member Author

ChrisPenner commented May 2, 2025

Huh, looks like there's a difference between what's VS Code is deciding to auto-trigger completion on vs what a "manual" trigger of "ctrl-space" does. This version is already better, but I'll fiddle a little more to try to get the best possible setup before I merge :)

@ChrisPenner ChrisPenner added the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label May 2, 2025
@aryairani aryairani merged commit 8334f2c into trunk May 2, 2025
32 checks passed
@aryairani aryairani deleted the lsp/dot-completion branch May 2, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants