Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Language Support for MPLABNew to Visual Studio Code? Get it now.
Language Support for MPLAB

Language Support for MPLAB

Microchip Technology

microchip.com
|
56,807 installs
| (1) | Free
C/C++ code completion, navigation, and insights.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Language Support for MPLAB®

Language Support for MPLAB provides project-aware C/C++ and assembly language support for MPLAB projects in Visual Studio Code. It uses MPLAB project and toolchain information to configure the available language-support engine for the active project configuration.

Features

Language Support for MPLAB is designed to enhance your coding experience while working on an MPLAB project by providing language server features such as code completion and go-to-definition.

IntelliSense engines

The extension supports two IntelliSense engines:

  • clangd — uses a compatible clangd language server from the active MPLAB toolchain. Clangd uses a compile_commands.json created by building an MPLAB project to obtain compiler flags, include paths, and other build information.
  • Microsoft C/C++ extension (cpptools) — provides model-backed IntelliSense for projects whose active toolchain does not have usable clangd support, or when CppTools is selected explicitly. The MPLAB CppTools provider derives compiler options, defines, include paths, and file membership from the active MPLAB project model.

CppTools does not read compile_commands.json. The project model is the source of truth for CppTools configuration.

Language support modes

The mplab.clangd.languageSupportMode setting controls which engine is used:

Mode Behavior
auto Uses clangd when the active toolchain supports it and clangd can be configured. Otherwise, uses model-backed CppTools.
clangd Uses clangd only. If clangd is unsupported or cannot be configured, the extension does not fall back to CppTools, and no language support will be provided.
cpptools-model Uses the Microsoft C/C++ extension with data derived directly from the active MPLAB project model. The CppTools provider does not require compile_commands.json.

When auto mode needs generated build information to configure clangd, the extension can trigger the MPLAB configuration-change task, watch for the expected output, and restart language support when it becomes available.

Configuring the IntelliSense engine

Setting Default Description
mplab.clangd.languageSupportMode auto Selects auto, clangd, or cpptools-model.
mplab.clangd.compileCommandsDir Not set Directory containing compile_commands.json for clangd. When auto-setting is enabled, the extension keeps it aligned with the active project configuration.
mplab.clangd.autoSetCompileCommandsDir true Keeps the clangd compile-commands directory aligned with the active MPLAB project configuration.
mplab.clangd.autoSetClangdExecutable true Selects a compatible clangd executable for the active toolchain.
mplab.clangd.onlyShowProjectFileDiagnostics true Limits diagnostics to files in the active MPLAB project configuration.

Additional settings are available through the Visual Studio Code Settings editor.

Upgrading

Existing mplab.clangd.languageSupportMode values of cpptools-compile-db are automatically migrated to cpptools-model at the same configuration scope. cpptools-compile-db is no longer a supported mode, and mplab.clangd.allowCppToolsModelFallback is no longer used.

Setup

Language Support for MPLAB requires MPLAB Services and an open MPLAB project.

For clangd-based language support, a compatible clangd language server can be found in supported MPLAB XC Compiler installations here. In auto mode, the extension selects clangd when the active toolchain supports it and falls back to model-backed CppTools when it does not.

For cpptools-model mode or automatic CppTools fallback, install the Microsoft C/C++ extension (ms-vscode.cpptools).

Language Support for MPLAB uses the active MPLAB project configuration to provide project-aware language support. Change the active configuration from the MPLAB LSP status bar item or its tooltip.

📦 Requirements

  • MPLAB Services
  • A supported MPLAB project and toolchain
  • The Microsoft C/C++ extension when using cpptools-model or automatic CppTools fallback

Troubleshooting

  • If clangd mode does not provide language support, verify that the active toolchain has a compatible clangd executable and that mplab.clangd.compileCommandsDir points to the expected build output.
  • If auto mode uses CppTools, clangd was unavailable or could not be configured for the active project configuration. The status bar tooltip identifies the current IntelliSense source.
  • If CppTools language support is unavailable, verify that the Microsoft C/C++ extension is installed and enabled.
  • If the wrong project configuration is used, select the intended configuration from the MPLAB LSP status bar item.

🐞 Feedback and issue reporting

Go to mplabfeedback.microchip.com to report issues and suggest enhancements.

📝 License Information

The MPLAB® Extensions for Visual Studio Code are distributed under a non-exclusive software license agreement provided by Microchip Technology Inc. To review the complete terms and conditions governing the use of this software, please consult the "license" file included with this package.


Language Support for MPLAB extension was forked from LLVM Clangd extension here


Copyright © 2026 Microchip

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft