mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor(cc): configure clang-format in :editor format
These should be upstreamed.
This commit is contained in:
@ -79,6 +79,12 @@ This is controlled by `+format-on-save-disabled-modes'."
|
||||
;; `+format-with-lsp-mode' in the appropriate modes.
|
||||
(add-to-list 'apheleia-formatters '(lsp . +format-lsp-buffer))
|
||||
|
||||
;; Use clang-format for cuda and protobuf files.
|
||||
(add-to-list 'apheleia-mode-alist '(cuda-mode . clang-format))
|
||||
(add-to-list 'apheleia-mode-alist '(protobuf-mode . clang-format))
|
||||
(add-to-list 'apheleia-formatters-mode-extension-assoc '(cuda-mode . ".cu"))
|
||||
(add-to-list 'apheleia-formatters-mode-extension-assoc '(protobuf-mode . ".proto"))
|
||||
|
||||
;; Apheleia's default clang-format config doesn't respect `c-basic-offset', so
|
||||
;; force it to in the absence of a .clang-format file.
|
||||
(setf (alist-get 'clang-format apheleia-formatters)
|
||||
|
Reference in New Issue
Block a user