Skip to content

The custom .clang-format file is not working #1048

@Penguin-SAMA

Description

@Penguin-SAMA

Version confirmation

  • Confirm

Following prerequisites

  • Confirm

Neovim version

NVIM v0.10.0-dev-951+g5d8ab32f3-Homebrew

Branch info

main (Default/Latest)

Minimal (user) folder structure required to reproduce the issue

lua/modules/configs/completion/formatters

Minimal config with steps on how to reproduce the issue

I have made the following changes in clang_format.lua:

return {"-style=file"}

I used clang-format -style=google -dump-config > .clang-format to generate the .clang-format file, and I placed it in the root directory of the project. The directory structure is as follows.

├── .git
├── src
│   ├── xxx.cpp
├── .clang-format

However, when I use :wq it still doesn't work. Do you know what the issue might be?

Expected behavior

It should format correctly.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    envIssues caused by incorrect environment settings (terminal, package manager, etc.)formattingLsp-formatting related issuesusageUser-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions