To configure Visual Studio Code so that single-clicking a folder in the Explorer only selects it and a double-click is required to expand or open it:
- Open Settings (
Cmd + ,
) - Search for
tree.expandMode
- Set it to
doubleClick
This setting prevents folders from expanding unless you intentionally double-click them, making navigation less error-prone when selecting multiple items.
References: