mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
Make completion docs scrollable
This commit is contained in:
parent
e8be14e5d6
commit
ca88717f0c
1 changed files with 15 additions and 11 deletions
|
@ -1064,18 +1064,22 @@ impl CompletionsMenu {
|
|||
.languages()
|
||||
.clone();
|
||||
let language = self.buffer.read(cx).language().map(Arc::clone);
|
||||
|
||||
enum CompletionDocsMarkdown {}
|
||||
Some(
|
||||
crate::markdown::render_markdown(
|
||||
&content.value,
|
||||
®istry,
|
||||
&language,
|
||||
&style,
|
||||
cx,
|
||||
)
|
||||
.constrained()
|
||||
.with_width(alongside_docs_width)
|
||||
.contained()
|
||||
.with_style(alongside_docs_container_style),
|
||||
Flex::column()
|
||||
.scrollable::<CompletionDocsMarkdown>(0, None, cx)
|
||||
.with_child(crate::markdown::render_markdown(
|
||||
&content.value,
|
||||
®istry,
|
||||
&language,
|
||||
&style,
|
||||
cx,
|
||||
))
|
||||
.constrained()
|
||||
.with_width(alongside_docs_width)
|
||||
.contained()
|
||||
.with_style(alongside_docs_container_style),
|
||||
)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Reference in a new issue