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

LSP completion doesn't work well in the middle of segments #5796

Closed
asterite opened this issue Aug 22, 2024 · 0 comments · Fixed by #5795
Closed

LSP completion doesn't work well in the middle of segments #5796

asterite opened this issue Aug 22, 2024 · 0 comments · Fixed by #5795
Labels
bug Something isn't working

Comments

@asterite
Copy link
Collaborator

Aim

When typing on top of an existing identifier, autocompletion either doesn't trigger, or it triggers but sometimes completes in a not-ideal way, for example inserting function arguments when those already exist in the code.

Here function arguments are inserted but then you have to go and delete existing ones:
lsp-middle-before

Here it doesn't trigger:
lsp-middle-2-before

Expected Behavior

Autocompletion works in these cases, and function arguments aren't inserted if they already exist, or if we are in the middle of a path.

Bug

It doesn't behave as the expected behavior.

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@asterite asterite added the bug Something isn't working label Aug 22, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Aug 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 22, 2024
# Description

## Problem

Resolves #5796

## Summary

I checked with Rust Analyzer how it works there, so now in Noir it works
like Rust Analyzer:


![lsp-middle](https://github.com/user-attachments/assets/27dc4f51-d8ce-4526-b9b3-479f77c802ad)


![lsp-middle-2](https://github.com/user-attachments/assets/59b395b2-86bb-49af-bd52-ff60633fd496)

## Additional Context


## Documentation

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant