-
Notifications
You must be signed in to change notification settings - Fork 369
Emacs
ailin-nemui edited this page Oct 26, 2020
·
2 revisions
Here is a basic .dir-locals.el
to configure simple indentation:
((c-mode . ((c-file-style . "linux")
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 8)
(fill-column . 100)
(clang-format+-context . 'modification)
)))
To integrate clang-format+ (auto-format on save), you can use these configs:
(require 'clang-format+)
(add-hook 'c-mode-common-hook #'clang-format+-mode)
If you want to use the clang-format-xs
wrapper included in the .github/workflows/clangformat/clang-format-xs
file, you can configure it like this:
(setq clang-format-executable "/path/to/src/irssi/.github/workflows/clangformat/clang-format-xs")