mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 02:35:00 +00:00
feat: init syntax library for function hover tip (#77)
* dev: introduce upstream tooltip * feat: basic function definition * feat: init syntax library * abandon * build: run syntax building * fix: let expression * fix: markup in code * fix: raw code
This commit is contained in:
parent
14fc4819f1
commit
a3948df5da
46 changed files with 3068 additions and 5 deletions
|
@ -61,8 +61,8 @@ fn def_tooltip(ctx: &mut AnalysisContext, source: &Source, cursor: usize) -> Opt
|
|||
crate::syntax::LexicalKind::Var(LexicalVarKind::Function) => {
|
||||
let f = lnk.value.as_ref();
|
||||
Some(Tooltip::Text(eco_format!(
|
||||
r#"```typc
|
||||
let {}({});
|
||||
r#"```typst-grammar
|
||||
#let {}({});
|
||||
```{}"#,
|
||||
lnk.name,
|
||||
ParamTooltip(f),
|
||||
|
@ -80,8 +80,8 @@ let {}({});
|
|||
|
||||
Some(Tooltip::Text(eco_format!(
|
||||
r#"
|
||||
```typc
|
||||
let {};
|
||||
```typst-grammar
|
||||
#let {};
|
||||
```{v}"#,
|
||||
lnk.name
|
||||
)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue