WolframResearch / vscode-wolfram

Official Visual Studio Code extension for Wolfram Language
MIT License
109 stars 7 forks source link

LSP not working on vscode jupyter (no autocomplete and on-hover documentation) #15

Closed rstanuwijaya closed 2 years ago

rstanuwijaya commented 2 years ago

The language support works well when editing .wl files, but only syntax highlighting works when working with mathematica code on jupyter notebook.

bostick commented 2 years ago

Please describe a little more what you are expected vs. what you are seeing, what are the steps you took for setup, etc.

rstanuwijaya commented 2 years ago

Hi @bostick, thank you very much for your reply.

When editing .wl file, I can get documentation when hovering the function as shown here: image

However, when working with Wolfram kernel in VSCode Jupyter Notebook, the documentation does not show up when hovering the function: image

I'm expecting to be able to see the documentation when working in the Jupyter Notebook, similar to what Python can do with using the Pylance extension.

I would be very happy to help with the code, but I'm not experienced in working with VSCode extension. Moreover, the Pylance extension is a proprietary Microsoft product, therefore I could not easily identify how to replicate the behavior of the extension.

bostick commented 2 years ago

I'm not sure there is anything to do here.

This extension uses Language Server Protocol to implement e.g. documentation popup when hovering.

I could not see if was possible for the Jupyter extension to use this same implementation.

And I'm not sure if the Jupyter extension allows other languages supplied by users.

Jupyter works by using a kernel spec and I'm not sure if you've set that up.

I'll leave this open for a bit, in case there are good examples of Jupyter extension supporting other languages.

bostick commented 2 years ago

I think there's nothing to do here for now. Please reopen if there is any development with the Jupyter extension supporting other languages.