njpipeorgan / wolfram-language-notebook

Notebook support for Wolfram Language in VS Code
Apache License 2.0
159 stars 11 forks source link

Use ?? or Information to give hover information #51

Closed asukaminato0721 closed 9 months ago

asukaminato0721 commented 1 year ago

Is your feature request related to a problem?

Sometimes ?? can give much more information for symbols. For example, ??Precedence will give

Precedence[sym]
returns the precedence of the output operator associated to the symbol sym.
Precedence[boxes, fmt]
returns the precedence of the operator of used in the typeset expression boxes, assuming it was typeset in the format fmt.

??Precedence // OutputForm

function taken from https://mathematica.stackexchange.com/a/819/68689

Describe the solution you'd like

Add an Option to read from ?? when hover on function.

Additional context

But the var type may be very long.

Unprotect[PlotRange];
ClearAttributes[PlotRange, ReadProtected];
??PlotRange // OutputForm
PlotRange is an option for graphics functions that specifies what range of coordinates to include in a plot. 
PlotRange[GraphicsArray[System`Dump`x_, System`Dump`opts___]] := With[{System`Dump`res = Graphics[GraphicsArray[System`Dump`x, System`Dump`opts]]}, PlotRange[System`Dump`res] /; System`Dump`GRTest[System`Dump`res]]
PlotRange[Internal`RasterGraphics[System`Dump`x_, System`Dump`opts___]] := With[{System`Dump`res = DensityGraphics[Internal`RasterGraphics[System`Dump`x, System`Dump`opts]]}, PlotRange[System`Dump`res] /; System`Dump`DGTest[System`Dump`res]]

and execute may also be slower than current method.


More deeply, is it possible to auto-complete those functions?

asukaminato0721 commented 9 months ago

fixed by https://github.com/asukaminato0721/mmacompletion