paulober / Pico-W-Stub

MicroPython stubs for the Raspberry Pi Pico W
Apache License 2.0
10 stars 3 forks source link

How do I add LVGL (or other library) details to intellisense of Pico-W-Stub? #12

Closed randomsmith9 closed 11 months ago

randomsmith9 commented 1 year ago

Hi,

I am trying to use the lvgl micropython port for PICO/PICO W but unsure as to how to get intellisense to work in MicroPico extension. For example the import statements show an error on lvgl - red squigle underneath in import lvgl as lv.

From what I can gather the stubs for LVGL would need to be added to this project (Pico-W-Stub)? LVGL is https://github.com/lvgl/lv_micropython

I can also see projects like micropython-stubs that looks to be an attempt to collect a large number of stubs for different platforms/boards/libraries. I can see lvgl in there for an esp32 but not for a Pico. - is this some overlap with features of Pico-W-Stub?

Thanks

paulober commented 1 year ago

You can add the stubs for your local intellisense into .vscode/Pico-W-Stub/stubs in a new folder.

I plan on updating the hole stub management system in MicroPico so maybe there will be an easier way for these to work in the future.