- Wait for all terms to be elaborated before showing folding regions. May want to change this to support partial results. - Use .span to extract import statements, rather than mutually recursive functions. - Some tiny other bits of cleanup
47 lines
416 B
Text
47 lines
416 B
Text
--^ textDocument/foldingRange
|
|
import Lean
|
|
import Lean.Data
|
|
|
|
open Lean
|
|
|
|
namespace Foo
|
|
|
|
open Std
|
|
open Lean
|
|
|
|
section Bar
|
|
|
|
/-!
|
|
A module-level doc comment
|
|
-/
|
|
|
|
/--
|
|
Some documentation comment
|
|
-/
|
|
@[inline]
|
|
def add (x y : Nat) :=
|
|
x + y
|
|
|
|
inductive InductiveTy
|
|
| a
|
|
|
|
|
/--
|
|
Another doc comment. This one is not folded.
|
|
-/
|
|
b
|
|
|
|
mutual
|
|
def a :=
|
|
1
|
|
def b :=
|
|
a
|
|
end
|
|
|
|
end Bar
|
|
end Foo
|
|
|
|
#check #[
|
|
1,
|
|
2,
|
|
3
|
|
]
|