Skip to content
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

Making autocomplete-plus work to replace ranges #479

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

mauricioszabo
Copy link
Contributor

No description provided.

@savetheclocktower
Copy link
Contributor

This is for choosing an autocomplete option when text is selected?

How would one make the autocomplete menu appear in that scenario?

@mauricioszabo
Copy link
Contributor Author

Actually (and I should have opened this as Draft) it's to decide what to replace.

Currently, Autocomplete works by: for example, if I type console.lo, and the suggestion says text: "log", prefix: "console.", it'll replace what's after the prefix with log.

But some LSP providers allow for fuzzy-finder matches - like, I can type console.lg, and it'll match log, and say "hey, replace <range> with "log"". This API is to start to support this kind of API

@savetheclocktower
Copy link
Contributor

OK, so sounds like this wouldn't change any behavior for existing providers until they were updated to support it. Understood.

@mauricioszabo
Copy link
Contributor Author

Yes, the new version will only be used if some provider declares that it supports the new version.

@confused-Techie
Copy link
Member

@mauricioszabo Hate to do this to you, but would you mind getting the newest changes from master so we can see green CI before a merge

@mauricioszabo
Copy link
Contributor Author

@confused-Techie after a couple months, done 😆

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

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

@mauricioszabo Thanks a ton for taking the time to get this updated!

And the changes here look great, and love to see tests passing (Beside macOS failing to build, but that issue lies somewhere else, not here).

Especially having a solid spec to lean on for implementation details later, and being able to write up documentation for, this looks incredibly solid, and I say lets get this merged!

@mauricioszabo
Copy link
Contributor Author

Ok, @confused-Techie, let me just update the changelog :)

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

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

LGTM! Lets get this merged

@mauricioszabo mauricioszabo merged commit 3c44af0 into master Sep 18, 2023
99 checks passed
@mauricioszabo mauricioszabo deleted the autocomplete-lsp-compatible-api branch September 18, 2023 15:39
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.

3 participants