-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The following code produces incorrect highlighting in VS Code in recent (post-#3968) Lean releases:
@[deprecated Array.get? "Use a[i]? or a.get? i instead"]
def Array.atIndex? (a : Array α) (i : Nat) : Option α :=
a.get? iThe web editor at live.lean-lang.org seems to be unaffected by this issue.
An interesting variant of this is
@[deprecated Array.get? "Use `a[i]?` or `a.get? i` instead", inherit_doc Array.get?]where the highlighting is only broken until the end of the attribute.
Steps to Reproduce
- Create a new Lean project on a recent nightly and paste in the above code
Expected behavior: Highlighting should work as usual
Actual behavior: Highlighting gets confused by the ] character in the deprecation message.
Versions
4.11.0-nightly-2024-08-05
Linux markus-z16 6.9.12-200.fc40.x86_64 leanprover/lean4#1 SMP PREEMPT_DYNAMIC Sat Jul 27 15:56:15 UTC 2024 x86_64 GNU/Linux
vscode-lean4 v.0.0.176 in VS Code 1.92.0
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
