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

autocomplete failure #5219

Closed
2 of 3 tasks
kbuzzard opened this issue Aug 30, 2024 · 1 comment · Fixed by #5257
Closed
2 of 3 tasks

autocomplete failure #5219

kbuzzard opened this issue Aug 30, 2024 · 1 comment · Fixed by #5257
Labels
bug Something isn't working

Comments

@kbuzzard
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

In the example below, Prod.continuous is a partially-typed declaration name.

structure ContinuousSMul (M X : Type) : Prop where
structure ContinuousAdd (X : Type) : Prop where

theorem Prod.continuousSMul {M X Y : Type} : ContinuousSMul M (X × Y) := ⟨⟩

theorem Prod.continuousAdd {X Y : Type} : ContinuousAdd (X × Y) := ⟨⟩

example : (ContinuousSMul Nat (Nat × Nat)) ∧ (ContinuousAdd (Nat × Nat)) := by
  exact ⟨Prod.continuousSMul, Prod.continuous⟩ -- put cursor after `s` in `Prod.continuous`
                                               -- and ctrl-space fails for me

I would expect autocompletion in VS Code to offer me e.g. Prod.continuousAdd (the thing which will close the goal), but for me it offers nothing:

autosuggest

Context

https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/autocompletion.20problem/near/466255717

Steps to Reproduce

  1. Copy the code above into Lean
  2. Put cursor after s in Prod.continuous
  3. ctrl-space

Expected behavior: [Clear and concise description of what you expect to happen]

Suggestions pop up e.g. Prod.continuousSMul, Prod.continuousAdd.

Actual behavior: [Clear and concise description of what actually happens]

No suggestions.

Versions

Lean (version 4.11.0-rc1, x86_64-unknown-linux-gnu, commit daa2218, Release)

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@kbuzzard kbuzzard added the bug Something isn't working label Aug 30, 2024
@eric-wieser
Copy link
Contributor

eric-wieser commented Aug 30, 2024

An even simpler failure:

example : True ∧ True := by
  exact ⟨trivial, True.in⟩

image

This is showing the wrong intro

github-merge-queue bot pushed a commit that referenced this issue Sep 10, 2024
Fixes #4455, fixes #4705, fixes #5219

Also fixes a minor bug where a dot in brackets would report incorrect
completions instead of no completions.

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this issue Sep 16, 2024
Fixes leanprover#4455, fixes leanprover#4705, fixes leanprover#5219

Also fixes a minor bug where a dot in brackets would report incorrect
completions instead of no completions.

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants