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

Add Language-Specific Overrides for clangd.fallbackFlags #701

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Jenway
Copy link

@Jenway Jenway commented Oct 15, 2024

Add Language-Specific Overrides for clangd.fallbackFlags

I think it'll be helpful for single file hints

Example configuration:

{
    "[c]": {
        "clangd.fallbackFlags": [
            "-Wall",
            "-Wextra",
            "-std=c11"
        ]
    },
    "[cpp]": {
        "clangd.fallbackFlags": [
            "-Wall",
            "-Wextra",
            "-std=c++17"
        ]
    }
}

Current Limitation:

When both .c and .cpp files are in the same folder, the extension uses the fallback flags of the language that first wakes the clangd extension. A manual restart of the language server is required when switching between files of different languages in the same workspace.

@Jenway Jenway closed this Oct 15, 2024
@Jenway Jenway reopened this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant