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

clang-format to respect indentation width? #338

Open
Icy-Thought opened this issue Dec 25, 2024 · 0 comments
Open

clang-format to respect indentation width? #338

Icy-Thought opened this issue Dec 25, 2024 · 0 comments

Comments

@Icy-Thought
Copy link

Icy-Thought commented Dec 25, 2024

Minor suggestion that I think could improve Apheleia's clang-format definition a little. We could allow Apheleia to determine the desired indentation width of clang-format when apheleia-formatters-respect-indent-level has been enabled + no .clang-format file has been found -> indentation width = tab-width or c-ts-mode-indent-offset.

(unless (locate-dominating-file default-directory ".clang-format")
  (when apheleia-formatters-respect-indent-level
    (format "--style={IndentWidth: %d}" c-ts-mode-indent-offset)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant