Only activate extension in some workspaces

nRF Connect for VS Code

tags
nRF Connect for VS Code

One of Visual Studio Code's biggest strengths as an editor is how many languages, frameworks and development environments it supports. To ensure that the nRF Connect extension does not interfere with Visual Studio Code's usefulness outside of development related to the nRF Connect SDK, the extension will only activate when it is actually needed.

Specifically, the extension will only be activated when you interact with it (like opening the nRF Connect extension or triggering a command the extension implements), or if the workspace contains any of the following files:

  • west.yml
  • Kconfig.zephyr
  • prj.conf
  • *.overlay
  • sample.yaml

In any other development environment, the extension will not start, will not generate any notifications, and will not consume any resources.

The nRF Connect icon is still present in the Sidebar to make it easy to start using the extension in new workspaces.