Skip to content

[clangd] Add clangd --style=<string> command line argument to pass to internal clang-format #140408

@Next-Door-Tech

Description

@Next-Door-Tech

Clangd currently has a command line option clangd --fallback-style=<string> which acts as if the same argument and its value were passed to clangd's internal clang-format. However, as with standalone clang-format, the fallback style must be one of the small handful of predefined presets provided.

Standalone clang-format has an additional argument clang-format --style=<string> which allows for fine-grained control over individual style parameters from the command line. This functionality would also be useful in clangd for hopefully obvious reasons.

Usage and semantics of clangd --style=<string> should be identical to those of clang-format --style=<string>.

Issue also created on clangd repository: clangd/clangd#2397

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions