lean4-htt/tests/lean/interactive/completionEndSection.lean
Marc Huisinga 1b1c802362
feat: auto-completion for end names (#10660)
This PR adds auto-completion for identifiers after `end`. It also fixes
a bug where completion in the whitespace after `set_option` would not
yield the full option list.

Closes #3885.

### Breaking changes

The `«end»` syntax is adjusted to take an `identWithPartialTrailingDot`
instead of an `ident`.
2025-10-08 11:12:05 +00:00

82 lines
1 KiB
Text

section
section Foo
end -- `Foo` expected
--^ completion
end
section
section Foo
end F -- `Foo` expected
--^ completion
end
section
section Foo
end B -- No completions expected
--^ completion
end
section
section Foo
section Bar
end -- `Bar` and `Foo.Bar` expected
--^ completion
end Foo
end
section
section Foo.Bar
end -- `Bar` and `Foo.Bar` expected
--^ completion
end Foo
end
section
section Foo
section Bar
end F -- `Foo.Bar` expected
--^ completion
end Foo
end
section
section Foo
section Bar
end B -- `Bar` expected
--^ completion
end Foo
end
section
section Foo
section Bar
end Foo. -- `Bar` expected
--^ completion
end
section
section Foo.Bar
end Foo.Bar
end -- No completions expected
--^ completion
section
section Foo.Bar.Geh
end Bar. -- `Geh` expected
--^ completion
end
section
section Foo
section
section Bar.Geh
end -- `Bar.Geh` and `Geh` expected
--^ completion
end
section
namespace Foo
namespace Bar
end Foo. -- `Bar` expected
--^ completion
end