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

Rework completion resolution #2126

Merged
merged 8 commits into from Apr 8, 2021

Commits on Apr 2, 2021

  1. Rework completion resolution

    Recently, Roslyn undeprecated the CompletionChange.TextChanges API. This API gives changes in a significantly simpler manner for us to deal with, as it splits up things like imports and the actual main change element, so we can remove a whole bunch of code dedicated to finding the changed elements and mapping original source locations to the new document. The new pattern is much simpler: except for import completion, we always resolve the change up front. For most providers, this is an extremely quick call, as most providers just return the label, and for the ones that don't we can't do much about it anyway. We can then loop through the individual changes, putting changes that are not touching the current cursor location into AdditionalTextChanges. This shrinks the completion payload pretty significantly for many scenarios, and gets rid of a bunch of special handling around it. The only remaining special handling is adjusting the filter texts and snippitizing completions that want to move the cursor. I've also aligned the behavior of the Preselect flag with Roslyn's completion handler, and removed additional filtering of completion items so that they can be filtered by the client instead.
    
    Fixes OmniSharp#2123 as well.
    333fred committed Apr 2, 2021
    Copy the full SHA
    322d568 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2021

  1. Adjust LSP tests as well.

    333fred committed Apr 4, 2021
    Copy the full SHA
    99e805d View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. Use Task.WhenAll for completion resolution. This can provide benefits…

    … in the override completion case, while having a minimal cost for the non-override case.
    333fred committed Apr 5, 2021
    Copy the full SHA
    3c95dbd View commit details
    Browse the repository at this point in the history
  2. Add Benchmarking project.

    333fred committed Apr 5, 2021
    Copy the full SHA
    185e9f5 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    127e565 View commit details
    Browse the repository at this point in the history
  4. Remove unneeded tuple.

    333fred committed Apr 5, 2021
    Copy the full SHA
    afcd88a View commit details
    Browse the repository at this point in the history
  5. Fix default rules

    333fred committed Apr 5, 2021
    Copy the full SHA
    21faedb View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. Copy the full SHA
    f81588e View commit details
    Browse the repository at this point in the history