Skip to content

Language server (clangd) settings not taking effect in profile override #40151

@joe-conigliaro

Description

@joe-conigliaro

Summary

Language server (clangd) settings not taking effect in profile override

Description

When I say profile override, I mean "Settings -> Select Settings Profile", as in the "profiles" config section.

Overriding lsp setting inside of a profile override does not take effect.
I should note that this testing is done while connected to a ssh host, as I wanted to be able to override the clangd settings for a remote server. But i think this would happen locally too since it seems like settings are just not being loaded for some reason.

Steps to reproduce:

  1. Override lsp config (add clangd path & --compile-commands-dir= argument) in normal settings.
  2. Verify it works.
  3. Move settings into a profile override & load the profile.
  4. Verify the settings no longer work.
  5. Move settings out of profile override and back to normal settings and it will work again.

Expected Behavior:
Clangd would work with the custom settings just as it does when its specified in normal settings.
Actual Behavior:
The settings do not take effect.

I can see in the clangd server logs that its not using the specified clangd, and I also see I[07:33:55.961] Failed to find compilation database for ....

View Configs (click to expand)
This config works as expected
{
  "lsp": {
    "clangd": {
      "binary": {
        "path": "/x/bin/clangd",
        "arguments": ["--compile-commands-dir=../build"]
      }
    }
  }
}
This config does not work
{
  "profiles": {
    "devbox": {
      "lsp": {
        "clangd": {
          "binary": {
            "path": "/x/bin/clangd",
            "arguments": ["--compile-commands-dir=../build"]
          }
        }
      }
    }
  }
}

Zed Version and System Specs

Zed: v0.207.4 (Zed)
OS: macOS 15.7.1
Memory: 16 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions