You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When typing in "." after a type or namespace in match and some tactics, the autocomplete suggestions are not appearing.
Context
I have noticed it in:
Match expressions (in the terms right after the "|" guards)
Tactic mode (in "apply" expressions or in "cases" guards)
Steps to Reproduce
Match Expression
Start with empty file (.lean) file in a lean/lake project
Add the following code:
inductiveDirectionwhere
| up
| right
| down
| left
deriving Repr
defangle (d: Direction) :=
match d with
| Direction.up => 90
| Direction.right => 0
| Direction.down => 270
| Direction.left => 180
Delete the ".up" and try re-adding a period "." after Direction
Expected behavior:
I expect to see the same dropdown that appears after typing the dot in #eval Direction.
Actual behavior:
No suggestions dropdown, red squiggly error line appears under text and hovering shows "invalid pattern Lean 4"
Versions
VS Code Extension: v0.0.176 Lean: version 4.10.0, x86_64-w64-windows-gnu, commit c375e19, Release OS: Windows 10
Additional Information
Similar issue found in all of the "." operators in this example
example : p ∨ (q ∧ r) → (p ∨ q) ∧ (p ∨ r) := by
intro h
cases h with
| inl hp => apply And.intro (Or.intro_left q hp) (Or.intro_left r hp)
| inr hqr => apply And.intro (Or.intro_right p hqr.left) (Or.intro_right p hqr.right)
When the elaborator doesn't provide us with any `CompletionInfo`, we
currently provide no completions whatsoever. But in many cases, we can
still provide some helpful identifier completions without elaborator
information. This PR adds a fallback mode for this situation.
There is more potential here, but this should be a good start.
In principle, this issue alleviates #5172 (since we now provide
completions in these contexts). I'll leave it up to an elaboration
maintainer whether we also want to ensure that the completion infos are
provided correctly in these cases.
When the elaborator doesn't provide us with any `CompletionInfo`, we
currently provide no completions whatsoever. But in many cases, we can
still provide some helpful identifier completions without elaborator
information. This PR adds a fallback mode for this situation.
There is more potential here, but this should be a good start.
In principle, this issue alleviates leanprover#5172 (since we now provide
completions in these contexts). I'll leave it up to an elaboration
maintainer whether we also want to ensure that the completion infos are
provided correctly in these cases.
Description
When typing in "." after a type or namespace in match and some tactics, the autocomplete suggestions are not appearing.
Context
I have noticed it in:
Steps to Reproduce
Match Expression
Expected behavior:
I expect to see the same dropdown that appears after typing the dot in
#eval Direction.
Actual behavior:
No suggestions dropdown, red squiggly error line appears under text and hovering shows "invalid pattern Lean 4"
Versions
VS Code Extension: v0.0.176
Lean: version 4.10.0, x86_64-w64-windows-gnu, commit c375e19, Release
OS: Windows 10
Additional Information
Similar issue found in all of the "." operators in this example
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: