When I use a function from the standard library there are nice little hints in the autocompletion that tell me what the function does and what its arguments are and so on.
In other programming languages there is a syntax for documentation comments that then show up in the autocompetion or the hint when hovering. (E.g. in Fortran a normal comment is ! while a documentation comment is either !! or !>)
Is there a way to do this in typst and get documentation for user-defined functions in autocomplete?
I didn’t find any issue regarding user-defined stuff, so you probably can create one. Currently, a great solution is to use tinymist. It already supports doc strings for the most part (first introduced):
It also supports showing type for completion tokens (first introduced):
I think it will fall into “Compiler Feature Request”. Later, an ide tag will be added by someone. Note that the web app uses Typst compiler under the hood (it is downloaded by the browser and all compilations are done on the client). It also uses typst-ide package for IDE stuff just like tinymist. (Although I think currently tinymist has a copy of that package to be able to access some private things.)