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

fix: let LSP suggest fields and methods in LValue chains #6051

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

asterite
Copy link
Collaborator

Description

Problem

LSP autocompletion didn't trigger in some cases.

Summary

Makes LSP autocompletion work when typing a dot but in the next line an l-value assignment follows. In that case the current line and the line that follows are parsed as a single assignment to an l-value and we must complete in the middle of that entire expression.

Additional Context

Also adds a missing follow_bindings() that caused some of these cases to not work.

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

github-actions bot commented Sep 16, 2024

Changes to Brillig bytecode sizes

Generated at commit: 75d3d78056190d59aef29809dae134cf0c1005a4, compared to commit: 9fb010ef8a93cf25e4d361ee42aa8969e5a46bab

There are no changes in circuit sizes

@asterite asterite requested a review from a team September 16, 2024 19:11
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Third time's the charm indeed 👍

@jfecher jfecher added this pull request to the merge queue Sep 16, 2024
Merged via the queue into master with commit 5bf6567 Sep 16, 2024
46 checks passed
@jfecher jfecher deleted the ab/lsp-complete-in-chains branch September 16, 2024 21:01
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 17, 2024
…oir-lang/noir#6051)

feat(metaprogramming): Add `#[use_callers_scope]` (noir-lang/noir#6050)
feat: show test output when running via LSP (noir-lang/noir#6049)
feat: add `Expr::as_lambda` (noir-lang/noir#6048)
feat: faster LSP by caching file managers (noir-lang/noir#6047)
feat: implement `to_be_radix` in the comptime interpreter (noir-lang/noir#6043)
fix: prevent check_can_mutate crashing on undefined variable (noir-lang/noir#6044)
feat: add `Expr::as_for` and `Expr::as_for_range` (noir-lang/noir#6039)
fix: Fix canonicalization bug (noir-lang/noir#6033)
fix: Parse a statement as an expression (noir-lang/noir#6040)
chore: rename CustomAtrribute to CustomAttribute (noir-lang/noir#6038)
fix: error on `&mut x` when `x` is not mutable (noir-lang/noir#6037)
feat: add `Expr::as_constructor` (noir-lang/noir#5980)
chore: Fix docs (noir-lang/noir#6035)
chore: document array methods (noir-lang/noir#6034)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 17, 2024
…oir#6051)

feat(metaprogramming): Add `#[use_callers_scope]` (noir-lang/noir#6050)
feat: show test output when running via LSP (noir-lang/noir#6049)
feat: add `Expr::as_lambda` (noir-lang/noir#6048)
feat: faster LSP by caching file managers (noir-lang/noir#6047)
feat: implement `to_be_radix` in the comptime interpreter (noir-lang/noir#6043)
fix: prevent check_can_mutate crashing on undefined variable (noir-lang/noir#6044)
feat: add `Expr::as_for` and `Expr::as_for_range` (noir-lang/noir#6039)
fix: Fix canonicalization bug (noir-lang/noir#6033)
fix: Parse a statement as an expression (noir-lang/noir#6040)
chore: rename CustomAtrribute to CustomAttribute (noir-lang/noir#6038)
fix: error on `&mut x` when `x` is not mutable (noir-lang/noir#6037)
feat: add `Expr::as_constructor` (noir-lang/noir#5980)
chore: Fix docs (noir-lang/noir#6035)
chore: document array methods (noir-lang/noir#6034)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 17, 2024
feat: allow visibility modifiers in struct definitions (noir-lang/noir#6054)
fix: let LSP suggest fields and methods in LValue chains (noir-lang/noir#6051)
feat(metaprogramming): Add `#[use_callers_scope]` (noir-lang/noir#6050)
feat: show test output when running via LSP (noir-lang/noir#6049)
feat: add `Expr::as_lambda` (noir-lang/noir#6048)
feat: faster LSP by caching file managers (noir-lang/noir#6047)
feat: implement `to_be_radix` in the comptime interpreter (noir-lang/noir#6043)
fix: prevent check_can_mutate crashing on undefined variable (noir-lang/noir#6044)
feat: add `Expr::as_for` and `Expr::as_for_range` (noir-lang/noir#6039)
fix: Fix canonicalization bug (noir-lang/noir#6033)
fix: Parse a statement as an expression (noir-lang/noir#6040)
chore: rename CustomAtrribute to CustomAttribute (noir-lang/noir#6038)
fix: error on `&mut x` when `x` is not mutable (noir-lang/noir#6037)
feat: add `Expr::as_constructor` (noir-lang/noir#5980)
chore: Fix docs (noir-lang/noir#6035)
chore: document array methods (noir-lang/noir#6034)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 17, 2024
feat: allow visibility modifiers in struct definitions (noir-lang/noir#6054)
fix: let LSP suggest fields and methods in LValue chains (noir-lang/noir#6051)
feat(metaprogramming): Add `#[use_callers_scope]` (noir-lang/noir#6050)
feat: show test output when running via LSP (noir-lang/noir#6049)
feat: add `Expr::as_lambda` (noir-lang/noir#6048)
feat: faster LSP by caching file managers (noir-lang/noir#6047)
feat: implement `to_be_radix` in the comptime interpreter (noir-lang/noir#6043)
fix: prevent check_can_mutate crashing on undefined variable (noir-lang/noir#6044)
feat: add `Expr::as_for` and `Expr::as_for_range` (noir-lang/noir#6039)
fix: Fix canonicalization bug (noir-lang/noir#6033)
fix: Parse a statement as an expression (noir-lang/noir#6040)
chore: rename CustomAtrribute to CustomAttribute (noir-lang/noir#6038)
fix: error on `&mut x` when `x` is not mutable (noir-lang/noir#6037)
feat: add `Expr::as_constructor` (noir-lang/noir#5980)
chore: Fix docs (noir-lang/noir#6035)
chore: document array methods (noir-lang/noir#6034)
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.

2 participants