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

Supermaven suggestions dont account for Zed autocomplete #17981

Open
1 task done
formbook opened this issue Sep 18, 2024 · 0 comments
Open
1 task done

Supermaven suggestions dont account for Zed autocomplete #17981

formbook opened this issue Sep 18, 2024 · 0 comments
Labels
autocompletions Feedback for code completions in the editor defect [core label] inline completion Umbrella label for Copilot, Supermaven, etc. completions supermaven

Comments

@formbook
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

when you use the built in autocomplete on a word, the supermaven suggestion starts from where the autocomplete began and repeats it on accepting

undoing the supermaven completion gives the correct suggestion

Environment

Zed: v0.154.0 (Zed Dev 4d074fc)
OS: Linux Wayland arch unknown
Memory: 31.3 GiB
Architecture: x86_64
GPU: AMD Radeon RX 6750 XT (RADV NAVI22) || radv || Mesa 24.2.2-arch1.1

If applicable, add mockups / screenshots to help explain present your vision of the feature

maven.mp4

If applicable, attach your Zed.log file to this issue.

Zed.log
@formbook formbook added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Sep 18, 2024
@notpeter notpeter added autocompletions Feedback for code completions in the editor inline completion Umbrella label for Copilot, Supermaven, etc. completions supermaven and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Sep 19, 2024
SomeoneToIgnore pushed a commit that referenced this issue Oct 10, 2024
…8858)

Track the cursor offset before biasing in the Supermaven completion
provider to better determine if the text should be suggested. The
underlying issue here is due to the way anchor biasing works, the
completion provider is not able to determine if a given suggestion's
cursor location no longer exists as it is always coalesced to a correct
location (specifically, the end of the line).

This change updates that logic so the offset is stored independently of
the buffer so it can be used to represent a location that may not exist
in the buffer anymore to represent locations that have been deleted.

The net effect is that suggestions can be backspaced much more cleanly
with Supermaven.


![image](https://github.com/user-attachments/assets/ff61aa09-54ea-4cad-b1ca-633a08bcdd96)


![image](https://github.com/user-attachments/assets/b49e2d6b-f1d3-41a1-9b75-c4bc3ac5f85b)

Release Notes:

- Improves #17981 to prevent
suggesting completions based on out-of-date cursor locations.
noaccOS pushed a commit to noaccOS/zed that referenced this issue Oct 19, 2024
…d-industries#18858)

Track the cursor offset before biasing in the Supermaven completion
provider to better determine if the text should be suggested. The
underlying issue here is due to the way anchor biasing works, the
completion provider is not able to determine if a given suggestion's
cursor location no longer exists as it is always coalesced to a correct
location (specifically, the end of the line).

This change updates that logic so the offset is stored independently of
the buffer so it can be used to represent a location that may not exist
in the buffer anymore to represent locations that have been deleted.

The net effect is that suggestions can be backspaced much more cleanly
with Supermaven.


![image](https://github.com/user-attachments/assets/ff61aa09-54ea-4cad-b1ca-633a08bcdd96)


![image](https://github.com/user-attachments/assets/b49e2d6b-f1d3-41a1-9b75-c4bc3ac5f85b)

Release Notes:

- Improves zed-industries#17981 to prevent
suggesting completions based on out-of-date cursor locations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocompletions Feedback for code completions in the editor defect [core label] inline completion Umbrella label for Copilot, Supermaven, etc. completions supermaven
Projects
None yet
Development

No branches or pull requests

2 participants