Skip to content

RA ignores vscode settings in multiroot workspace #17810

Description

@devjgm

rust-analyzer version: rust-analyzer version: 0.3.2062-standalone (c9109f2 2024-08-04)

rustc version: rustc 1.80.0 (051478957 2024-07-21)

editor or extension: VSCode on macOS

Version: 1.92.0
Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124
Date: 2024-07-31T23:26:45.634Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

relevant settings: Nothing special. All defaults.

repository link (if public, optional): Here's a small repro repository: https://github.com/devjgm/multiroot

code snippet to reproduce:

The problem is that I have a repo with two areas (directories) where rust-analyzer needs to be configured differently. For example, each directory needs to use a different "rust-analyzer.check.overrideCommand". Since these rust-analyzer settings are specified in the .vscode/settings.json file in the root of each workspace (vscode workspace, not cargo workspace), I'm trying to use vscode's "multiroot workspaces" to make this work.

I define the vscode multiroot workspace like this:

{
    "folders": [
        {
            "path": "."
        },
        {
            "path": "sub"
        }
    ],
}

but when I do this vscode says:

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

for all of rust-analyzer's settings in my .vscode/settings.json files. See the screenshot below. The observed behavior also seems to suggest that rust-analyzer's settings are not being applied.

image

Questions

  • Is this a bug that should work today?
  • Am I simply configuring something wrong?
  • Is this a new feature that you're considering adding?

Related

This seems related to #1104, but the final command and resolution on that issue suggests something about linkedProjects, which doesn't really help. Again, the goal is to use different rust-analyzer settings in each of vscode's "multiroot" workspaces.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions