settings-precedence

Document VS Code settings precedence rules for extension development.

10|2|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/mahmoud20138/Claude-Skills-Collection --skill settings-precedence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: settings-precedence
Source: https://github.com/mahmoud20138/Claude-Skills-Collection/tree/main/05-VSCode-Extension-Skills/settings-precedence
Command: npx skills add https://github.com/mahmoud20138/Claude-Skills-Collection --skill settings-precedence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the common and frustrating bugs caused by incorrect VS Code settings precedence, ensuring your extension's configurations are applied reliably and don't overwrite user preferences.

Core Features & Use Cases

  • Precedence Rules: Clearly outlines the order from highest to lowest priority (Workspace folder, Workspace, User, Default).
  • Scope Handling: Emphasizes the critical importance of passing the correct scope to getConfiguration() and inspect(), especially in multi-root workspaces.
  • Safe Updates: Provides patterns to avoid overwriting user-explicit settings and to update configurations at the appropriate scope.
  • Use Case: Debugging why your extension's settings are not being applied or are being unexpectedly overridden by user configurations.

Quick Start

Review the VS Code settings precedence rules to ensure your extension handles configurations correctly.

Frequently Asked Questions about settings-precedence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why are my VS Code extension settings being overridden by user configurations?

VS Code settings precedence dictates that Workspace folder settings override Workspace, User, and Default settings. Your extension must inspect configurations correctly using the appropriate scope to prevent unexpected overrides.

How do I inspect VS Code configuration values without overwriting user settings?

Use the VS Code API inspect() method instead of get() to read configuration values. This allows you to check user-explicit settings at specific scopes before applying updates, preventing accidental overwrites.

What is the correct precedence order for VS Code settings in extension development?

The precedence order from highest to lowest is Workspace folder, Workspace, User, and Default. Understanding this hierarchy ensures your extension applies configurations reliably without corrupting user preferences.

How do I handle VS Code getConfiguration scope in multi-root workspaces?

Pass the correct scope to getConfiguration() when handling multi-root workspaces. This ensures your extension reads and updates configurations at the appropriate workspace folder level, preventing configuration corruption.

Does my VS Code extension need to check all configuration scopes before updating settings?

Yes, your extension must inspect all configuration scopes before updating. Failing to check higher-priority scopes like Workspace folder or User settings can result in overwriting explicit user preferences.

Why does get() return the wrong VS Code configuration value for my extension?

The get() method returns the merged configuration value, which may not reflect user-explicit settings. Use inspect() to retrieve the specific values at each scope and determine the actual applied configuration.