MicroPython & CircuitPython IntelliSenseAdd 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, but should already be usable. Bug reports are very welcome, thank you! https://github.com/carlosperate/vscode-micropython-lsp/issues Why this extension vs a generic Python LSPThe goal of this extension is to provide a Python 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 based VS Code for the Web (https://vscode.dev, https://github.dev), and it ships with full stubs for the most common MicroPython and CircuitPython boards. Stubs come from the MicroPython-Stubs and CircuitPython projects. Supported boardsPick your board with the MicroPython & CircuitPython IntelliSense: Select Board
command, from the board shown in the status bar while a Python file is open,
or by adding it to your settings (
What gets analysedYour project's Stubs cover what isn't a file in your project. The stubs for
MicroPython/CircuitPython built-in modules, like Libraries present in your project as compiled Using it alongside other Python extensionsVS Code runs all the Python language servers installed simultaneously and shows 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 individually. This extension can detect this and offer to switch off other Python extensions for a MicroPython/Circuitython project. The setting is saved in the project workspace settings and nothing is ever written without your request. You can also do this manually in your project's
You can also enable/disable this MicroPython/CircuitPython extension with this setting in your global or workspace settings:
LicenceMIT, see LICENSE. Extension based on Microsoft's LSP web extension sample, MIT. |