Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge settings clangd.arguments from user and workspace #437

Open
zhang-stephen opened this issue Jan 12, 2023 · 1 comment
Open

Merge settings clangd.arguments from user and workspace #437

zhang-stephen opened this issue Jan 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zhang-stephen
Copy link

image

As the screenshot shows, I add different arguments for clangd in user default settings and workspace settings.

User default settings:

{
    "clangd.arguments": [
        "-j=6",
        "--all-scopes-completion",
        "--background-index",
        "--completion-style=bundled",
        "--enable-config",
        "--pch-storage=memory",
        "--offset-encoding=utf-16",
        "--log=info",
        "--header-insertion=iwyu",
    ]
}

Workspace settings:

{
    "clangd.arguments": [
        "--query-driver=/home/p8zhang/workspace/l1low/sysroot/thor/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/aarch64-wrs-linux/g*"
    ]
}

I think this could be merged automatically, instead of a warning. I could keep the common arguments from different workspaces if so. I think it's more useful.

@zhang-stephen zhang-stephen added the enhancement New feature or request label Jan 12, 2023
@i-ky
Copy link

i-ky commented Jan 12, 2023

If clangd.arguments was split into multiple options as suggested in #50, merging would happen "automatically" following usual VS Code setting precedence. There are not just user and workspace settings to merge, there are also remote settings and folder settings in multi-root workspaces. If merging is done by extension itself, it may be tricky to implement and behaviour may end up inconsistent with the rest of VS Code ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants