MicroPython & CircuitPython Language ServerAdd autocomplete, inline docs, go to definition, and type checking for Embedded Python projects using MicroPython or CircuitPython 🐍🤖. Works on both desktop and web versions of VS Code, and compatible editors. 🚧 This extension is still under development, currently only micro:bit stubs are implemented, but more will be added soon. Why this extension vs a generic Python LSPThe goal of this extension is to provide a language server specifically configured for MicroPython and CircuitPython, so the completions and signatures it offers are relevant to your embedded Python project. Existing Python extensions expect to be running on the desktop or a server with filesystem access, to scan installed packages for type information. This extension is designed to run on both desktop and the browser version VSCode web (https://vscode.dev, https://github.dev), and it ships with full stubs for the most common MicroPython and CircuitPython boards, so what it offers matches the board you are using. Stubs come from the MicroPython-Stubs and CircuitPython projects. Supported boards🚧 This extension is still under development and only micro:bit stubs are implemented. Add to your workspace settings (
More MicroPython and CircuitPython boards will be added soon in future releases. What gets analysedYour project's Stubs cover what isn't a file in your project. The stubs for
MicroPython/CircuitPython built-in modules, like Using it alongside other Python extensionsVS Code runs every Python language server installed and shows all of their results combined. As the generic Python extensions (like Microsoft's Pylance, Pyright, etc), might contain invalid stubs for MicroPython/CircuitPython, it is recommended to disable them for your project. VS Code does not have a setting to pick a single language server, so each of the
others has to be switched off with its own settings.
To disable the most common Python extensions, add this to your project's
On the other hand, you can disable this specialised MicroPython/CircuitPython Python extension with this setting in your global or workspace settings:
LicenceMIT, see LICENSE. Extension based on Microsoft's LSP web extension sample, MIT. |