Skip to content

Feature request: Support resource scoped settings #722

Closed
eclipse-lemminx/lemminx
#1877

Description

@bmaupin

Hi,

I rely heavily on vscode's multi-root workspaces feature. However, when using multi-root workspaces I can only change settings for this extension across the entire workspace and not inside individual projects in the workspace.

When I set any of the extension settings inside the .vscode/settings.json file in my project, they're disabled and when I mouse over them I see this message:

This setting cannot be applied in this workspace. It will be applied when you open the containing workspace folder directly.

If I understand correctly, it seems like support has to be added to the extension itself:

You as extension author have to make the decision which scope applies to your settings:

Scope Description
window The setting is applied to the entire VS Code instance.
resource The setting is applied depending on an active resource.

By default, all settings have the window scope, however, we encourage you to support settings on the resource scope. Settings that apply on the window level are not supported once they are defined within a workspace folder, and as soon as the user entered a multi-root workspace. Settings that apply on a resource level however are supported, and as such, each workspace folder can have different values for these settings.

https://github.com/Microsoft/vscode/wiki/Adopting-Multi-Root-Workspace-APIs#settings

Thanks!

Activity

  1. angelozerr commented on Jun 21, 2022

    @angelozerr
    Contributor

    Today LemMinx (our XML language server) doesn't support workspace folder (for settings), but we did that for our another project Quarkus Qute LS. I think it is doable.

  2. gillibrand commented on Feb 9, 2023

    @gillibrand

    Without this support, is there any way to share formatting preferences with a team? Normally I'd put shared settings in .vscode/settings.json, but now everyone has to hand-copy the same settings. Something I'm missing?

  3. gian1200 commented on May 26, 2026

    @gian1200

    +1

    Is there any news? I'd be nice to have "xml.format.maxLineWidth" per project

  4. added 4 commits that reference this issue on Oct 13, 2026
    4ce6367
    73c4266
    25cf040
    e84f186
  5. added a commit that references this issue on Oct 13, 2026
    6d7aeae
  6. angelozerr commented on Oct 14, 2026

    @angelozerr
    Contributor

    Fixed with eclipse-lemminx/lemminx#1877 but only for xml.format.* settings.

    If you need more settings (ex: completion etc) please create a new issue

  7. self-assigned this
    on Oct 14, 2026
  8. added this to the 0.30.0 milestone on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions