leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
4.04k stars 348 forks source link

a code suggestion bug #4455

Open fonqL opened 3 weeks ago

fonqL commented 3 weeks ago

Prerequisites

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

Description

def aaaaa := 1

#eval ([1,2,3].map λ c => a).length

When I type a in the lambda, LSP only suggests the symbols in the namespace of List, not global symbols.

Context

Zulip discussion

Steps to Reproduce

  1. Paste the code above in vscode.
  2. Put the cursor in the character a in the lambda.
  3. Trigger suggestion.

Expected behavior:

Show global symbols, including aaaaa.

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

Only show symbols in List namespace.

Snipaste_2024-06-14_15-32-05

Versions

4.9.0-rc1

Additional Information

Impact

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

fonqL commented 3 weeks ago

Sorry, I seems to report in a wrong place..

mhuisi commented 3 weeks ago

No, I think this is the right place!