WolframResearch / vscode-wolfram

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

LSP for wolfram language in VSCode jupyter notebook #32

Open BinaryQuantumSoul opened 1 year ago

BinaryQuantumSoul commented 1 year ago

So I have the WolframLanguageForJupyter paclet and kernel which runs fine in both Jupyter Notebook and in the Visual Studio code ipynb support.

I also installed the VSCode Wolfram extension. The syntax highlighting works fine, and the language server protocol is working fine for any files, except .ipynb. In particular, it won't give linting or documentation if I'm editing a notebook cell set to wolfram language.

How should I configure the extension to still run LSP for those cases ?

asukaminato0721 commented 1 year ago

+1 for https://github.com/njpipeorgan/wolfram-language-notebook , I miss the code formatter.

BinaryQuantumSoul commented 1 year ago

+1 for https://github.com/njpipeorgan/wolfram-language-notebook , I miss the code formatter.

I'll check that out, thanks

asukaminato0721 commented 11 months ago

+1 for https://github.com/njpipeorgan/wolfram-language-notebook , I miss the code formatter.

I miss the code formatter.

https://github.com/asukaminato0721/mmafmt/

asukaminato0721 commented 10 months ago

Now I know it...

https://github.com/WolframResearch/vscode-wolfram/blob/8b55fb1724d971a303120b3f5b981d654c308c59/src/extension.ts#L139

change to

 documentSelector: [{ language: 'wolfram' }], 

then it could work on ipynb.

asukaminato0721 commented 10 months ago

image

it works now :)