Custom docs do not show up in VSCode browser

I noticed that documentation for custom functions does not show up in my VSCode documentation broswser. The following does not work if executed in the REPL

“”"

Here’s some inline maths: \\sqrt[n]{1 + x + x^2 + \\ldots}.

Here’s an equation:

``\\frac{n!}{k!(n - k)!} = \\binom{n}{k}``

This is the binomial coefficient.

"""

func(x) = ()# ...

However if I add Distributions to the session, Normal will show up. Is there a way to allow my documentation appear in the documentation browswer?

Thanks!

Is this meant to be the same as your func?
Are you defining this function in a module first before directly entering it in REPL?

Hello.

Normal is the normal distribution object from Distributions.jl. That works. However, the following do not work: entering a function in the REPL, entering a function wrapped in a module into the REPL, and loading a package I made.

It makes me wonder if there is an “update docs” function somewhere.

Are you using the Revise.jl Package in your workflow?

The docs pane (like almost all functionality) is based on the editor/project state, not the runtime state, so that’s basically expected.

I tried with Revise.jl with no success. Strangely, Normal shows up even though Distributions has not been loaded.

@pfitzseb, could you please explain what you mean by edit/project state? Is that the “Julia env: …” at the bottom of the window?

The docs pane search should look at all symbols in the environment and also all symbols defined in your local project’s code, but the latter part isn’t working correctly atm, I think. Runtime state (i.e. anything you do in the REPL) doesn’t matter at all though – you don’t even need to have a REPL session running to get docs.

1 Like

Thanks for your explanation. Would you like me to open up an issue at Julia-VSCode?

I’m looking into it.

1 Like

Why do some packages load into the documentation pane and others do not? In the REPL, the documentation for MCHammer.jl works but does not exist in the eyes of VScode. Any thoughts? Is there something in the package itself preventing the doc from rendering?