MicroPython with VisualStudio Code
MicroPython with VisualStudio Code
I want to develop with Visual Studio Code and I'm struggeling with the Code-Completion. I searched nearly a week for a solution to get this working, but Modules like "machine" or "network" won't be recognized. Obviously I'm to stupid, so please could anybody write a little "step-by-step guide" or a simple "how-to".
I already get the Board specific modules (for ESP8266 in my case) by simply adding the sources of micropython (a git clone) to "python.autoComplete.extraPaths" in my settings.json, but this doesn't work for the previously named modules.
I'm using the "Micropython IDE" and "Pymakr" Extensions in VSCode wich are working fine.
I already get the Board specific modules (for ESP8266 in my case) by simply adding the sources of micropython (a git clone) to "python.autoComplete.extraPaths" in my settings.json, but this doesn't work for the previously named modules.
I'm using the "Micropython IDE" and "Pymakr" Extensions in VSCode wich are working fine.
Re: MicroPython with VisualStudio Code
Has also been asked here btw: https://stackoverflow.com/questions/541 ... hon-syntax
Re: MicroPython with VisualStudio Code
....However this question would probably reach the best audience on the MicroPython forum
and here I am
and here I am
-
- Posts: 288
- Joined: Sun May 04, 2014 8:54 am
Re: MicroPython with VisualStudio Code
Can we create stubs from the help() output? Or the documentation?
Re: MicroPython with VisualStudio Code
This thread may have some useful links:
viewtopic.php?f=15&t=4846
viewtopic.php?f=15&t=4846
Re: MicroPython with VisualStudio Code
Sorry, I forget to tell you, that I'm absolutly new to Python programming
I kindly ask for someone to post a simple "Do this, then do that" instruction manual to get Intellisense working for micropython.
I kindly ask for someone to post a simple "Do this, then do that" instruction manual to get Intellisense working for micropython.
Re: MicroPython with VisualStudio Code
Hi , Ive been working on a solution to help with both code completion and linting for VSCode.
It's still quite experimental, and requires some manual configuration but I am gently optimistic.
https://github.com/Josverl/micropython-stubber
The way it currently works is to
- generate the subs on the Micropython board ( to cater for different firmwares)
- download the stubs to a folder on your harddrive
- configure autoclomplete and pylint to use these stubs.
the downside is that the stubs generated this way have no parameter or type information
I just discovered the micropython-cpython-* modules on pypi , and as they do have that information that may be helpful,
but there is additional work to match up / merge and download these so they can be used in a similar way
Jos
It's still quite experimental, and requires some manual configuration but I am gently optimistic.
https://github.com/Josverl/micropython-stubber
The way it currently works is to
- generate the subs on the Micropython board ( to cater for different firmwares)
- download the stubs to a folder on your harddrive
- configure autoclomplete and pylint to use these stubs.
the downside is that the stubs generated this way have no parameter or type information
I just discovered the micropython-cpython-* modules on pypi , and as they do have that information that may be helpful,
but there is additional work to match up / merge and download these so they can be used in a similar way
Jos
Re: MicroPython with VisualStudio Code
Hi josverl,
I'm glad to hear from your work. By the time I ask the VSCode-Python Team to support micropython as well and the are evaluating the request https://github.com/Microsoft/vscode-python/issues/5098
If it's ok for you, then I will also link your repository in the Request, maybe if you and the MS-Team work together we all could get an outstanding solution. In my opinion is the support in VSCode a "must have" these days.
greetings
I'm glad to hear from your work. By the time I ask the VSCode-Python Team to support micropython as well and the are evaluating the request https://github.com/Microsoft/vscode-python/issues/5098
If it's ok for you, then I will also link your repository in the Request, maybe if you and the MS-Team work together we all could get an outstanding solution. In my opinion is the support in VSCode a "must have" these days.
greetings
Re: MicroPython with VisualStudio Code
Thanks for the connect,
it would be cool to merge efforts and jointly move forward.
/Jos
it would be cool to merge efforts and jointly move forward.
/Jos
Re: MicroPython with VisualStudio Code
Hello from San Luis Argentina. Nice Work. I run the script for the stubbs on a Lopy 1.0 with pycom Firmware and it works fine. The use in VisualStudio i have not tested yet. I prefer to use Atom is there a possibility to use the stubs with the Jedi Plugin in Atom?