typst_analyzer_analysis/completion/
code.rs1use tower_lsp::lsp_types::{CompletionItem, CompletionItemKind};
2
3use super::generic::TypCmpItem;
4
5pub fn constructors() -> Vec<CompletionItem> {
6 let mut items = Vec::new();
7 let constructor: Vec<(&str, &str, String)> = vec. The footnote itself is realized as a normal superscript, so you can use a set rule on the [super](https://typst.app/docs/reference/text/super/) function to customize it. You can also apply a show rule to customize only the footnote marker (superscript number) in the running text.
21"#, "footnote", "#footnote[${1:footnote}]".to_owned()),
22 ];
23 for ctx in constructor {
24 let item = TypCmpItem {
25 label: ctx.1.to_owned(),
26 label_details: "code",
27 kind: CompletionItemKind::FUNCTION,
28 documentation: ctx.0,
29 insert_text: ctx.2.to_owned(),
30 };
31 items.push(item);
32 }
33 TypCmpItem::get_cmp(items)
34}