roipoussiere / cadquery-vscode

Build parametric 2D/3D CAD models in VSCode with the CadQuery library.
https://open-vsx.org/extension/roipoussiere/cadquery
MIT License
18 stars 4 forks source link

Show syntax errors in your code #1

Closed bernhard-42 closed 2 years ago

bernhard-42 commented 2 years ago

Typos, wrong API use, ... will just be hidden behind the cadquery server. Can this be surfaced in some VS Code output model?

roipoussiere commented 2 years ago

Yes, good point!

Currently the server returns a json response that only contains the model field at the root level, and I plan to add stdout and stderr.

roipoussiere commented 2 years ago

I added type checking and code completion! It will be included in the next release.

pylance

Note that I'm still on my host, where CadQuery is not installed.

It is made using CadQuery stubs generated with MyPy, that I included in the extension.

Here it works with Pylance, but it should work with other language servers.

roipoussiere commented 2 years ago

I think I can close this now, since it fixes the original request Show syntax errors in your code. I will add code output in the future.