Skip to content

feat: completion fallback - #5299

Merged
mhuisi merged 8 commits into
leanprover:masterfrom
mhuisi:mhuisi/completion-fallbacks
Sep 12, 2024
Merged

mhuisi merged 8 commits into
leanprover:masterfrom
mhuisi:mhuisi/completion-fallbacks

Conversation

@mhuisi

@mhuisi mhuisi commented Sep 10, 2024 •

Copy link
Copy Markdown
Contributor

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 fixes #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.

This one already broke months ago and adapting it to the completion fallback mechanism would result in a very unstable test.
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Sep 10, 2024
@ghost

ghost commented Sep 10, 2024 •

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase f86901844726222f026b8cf345f3ac67abc8f7f0 --onto 8f899bf5bd04cc854e30fc29e75390f32e95883a. (2024-09-10 16:20:57)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase f86901844726222f026b8cf345f3ac67abc8f7f0 --onto adfd6c090ef7d6bdcc8f69c5dd6f919b1b71cab3. (2024-09-12 16:03:54)

@mhuisi
mhuisi added this pull request to the merge queue Sep 12, 2024
Merged via the queue into leanprover:master with commit b343795 Sep 12, 2024
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this pull request Sep 16, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete suggestions after dot (".") not appearing in some contexts

1 participant